1

I have a requirement in creating a dependent dropdown list in Sitecore 9 forms. For example one is state and other is country. How to accomplish this?

3
0

Follow the below mentioned steps:

  1. Create an API that would return the list of states for the given country.
  2. Bind a client side function with index change event of dropdown "Country"
  3. Make a call to the API (#1) and bind the state dropdown.
3
-1

By dependent I assume you mean when you select country the state list should be the states inside that country not all the states in the world.

If that is the case, Sitecore doesn't support that complex logic out of the box, but you can develop your own Forms Controls.

https://doc.sitecore.com/developers/90/sitecore-experience-manager/en/walkthrough--creating-a-custom-form-element.html

Please be careful if you created any template in Sitecore forms be sure you have _standard Values with that template, otherwise it will fail silently without an error and you won't be able to know where is the problem is coming from.

If you are estimating you have to aside some slack time as you will stumble upon a lot of situations like that, where it fails silently and you have to figure it somehow by your own.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.