Change "Required" Form Field Attribute via Frontend?

Is there any way to use JS to change a form field between “required” and “not required”? I’m trying to create a customization for a form where a field would only be required conditionally, based on the value of another field. But I believe LiveWhale checks the required-ness of a field against the server, not just against frontend attributes.

Hi Jon,

It looks like the core form validation checks against the saved form structure in the database when reviewing required-ness. Given that, I think to do what you’re describing, you’d want to save all the possible fields as not-required in LiveWhale, and then with a custom module you could use onFormsSubmission to add custom validation when the desired criteria are met. (With a JS component on the front-end to cosmetically tell users which fields are required.)

Karl

Thanks. That’s kind of what I figured I would need to do.