Expand my Community achievements bar.

control form fields

Avatar

Level 1

Can I know how to control form fields based on selection of a value in dropdown of another field. Actually I found an article in below link which we will be used for controlling fields based on our selection in touch UI dialog (cq:dialog). But in html page(form) when we are working on form, how can we control some widgets to show and hide based on our selection in dropdown ?

Example : In sites after selecting a page -> Create workflow -> In “Create workflow” page, If we select our project related workflow from dropdown, I need to display two more fields otherwise I want to hide them.

The below links explains similar scenario under Touch UI dialog (cq:dialog) but not in Form.
https://helpx.adobe.com/experience-manager/using/dynamic_touchui.html
Please guide !!!

1 Reply

Avatar

Level 10

On a web page - this is straight JavaScript -- https://stackoverflow.com/questions/5686735/populate-one-dropdown-based-on-selection-in-another

You do not use AEM APIS like Granite for this. Just JS.