Control options enable/hide ... dynamically on a form

Hi everyone,

I got a trouble need you help to find solution.
I have a form (on FE, not on CMS), it contains some form fields can be radio list, checkbox set list, textbox …
The options of radio/CheckboxSetField are defined dynamically in CMS.
But I also need to control some really specific logics like this: only enable/hide an option of a form field if another option of other form field is selected.
And these logics are also defined/customised in CMS.
So how can I do that ? Do I need to work with jquery to apply these logics on the form ?

You’ll need to add the logic in your front-end scripts, yes. If you’re already using jQuery, then you might as well stick with that.

1 Like

Hi @Tim
Thank you so much
Can you help to give me more detail about basic steps of solution ? Do we need something like FormFieldExtension, …
How can we manage option logics from BE to FE ?

Hard to be too specific without knowing a bit more about your scenario, how the form is built, etc.

It might be worth a look at the userforms module too. That should allow some simple display rules, along with making the form manageable in the CMS:

1 Like

Thank @Tim so much.
I will check that code soon.