Resolving mandatory field hidden by Javascript issue

By: Oliver Honeywill | Asked: 10/14/2022
ForumsCategory: Paid Help WantedResolving mandatory field hidden by Javascript issue
Oliver Honeywill asked 1 year ago
We have three instances of a form, on separate WordPress sites, that all use an Ideal Postcode plugin to assess whether or not a postcode is:
  • In-Area
  • Out-of Area
  • Beyond Area
The plugin correctly assesses the postcodes, and for the Out of Area postcodes displays a disclaimer and checkbox to confirm registration as Out of Area patient. However, the checkbox cannot be mandatory, because when made so, the field, correctly hidden by the javascript for In-Area postcodes, is invoked when trying to 'continue' to the next screen, and progression to the next screen is impossible until the In Area registration confirms Out of Area registration. So we have no way to enforce the confirmation of Out of Area registration when correctly displayed - which seems improbable. Can anyone help? Here are the three forms:
1 Answers
Bobby Clapp answered 1 year ago
This will require some custom code in my mind. You'll need to work out the exact code on your own, but here is a start:
Rob LeVineRob LeVine replied 1 year ago

I agree with Bobby on this. I've coded different variations on this theme from two angles: 1 - removing the requirement on a field that's hidden but not removed from the DOM and 2 - adding a requirement to a field that didn't currently have one. I've found it can be a moderate project, as opposed to simple and hard because often you have to make the field both look and act as you require.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community