Set Required Fields Dynamically
-
I’m doing two forms using two templates which is fine (I’ve been browsing you’re support threads – lots of info making the plugin extremely customisable!).
However I’d like to require a couple of fields in one form/template but not another. I saw you could dynamically set the ‘type’ of a field on the record template from hidden to text using:
$this->record->fields['fieldname']->form_element = 'text-line'
Can a similar method be used to set the validation property of a field to required in the signup template, even if it’s not set to be required in the WP backend? Something like:
$this->fields['fieldname']->validation = 'yes'
I’ll be able to try some things out myself tomorrow, but if you can help that would be great!
https://www.ads-software.com/extend/plugins/participants-database/
- The topic ‘Set Required Fields Dynamically’ is closed to new replies.