Require or Clear Fields Based On CSS Class

Hey all,

We have a lot of forms with conditional questions. A lot of these are internal order forms or the likes where a preliminary question determines which others show up and are set as required. Some of these are multi-page long wizards, etc. I can easily write the JS to do this per field, but was wondering if there's a simple way to do so by class, as it would save me a few hundred lines across our forms and I haven't been having luck doing so myself.

We'd need it to show and set as required when the option is selected, then hide and clear when deselected. Hide/show by class is easy, it's the require and clear by class that I'm having difficulty with.

Hello @t.sheehy,

You can place these fields inside the Grid container and make them required using the grid's class.

Please see this post for instructions: