Disable back-end validation of select fields
-
Dear Forminator team,
First, I’d like to offer you my appreciation for your amazing form plug-in and your great support.
My problem: I have a form with several select fields that get their options dynamically from the back-end via AJAX callback function. Unfortunately, Forminator performs a back-end validation to check whether the selected options in the select fields are actually configured in the fields’ settings. As these checks fail, nothing is stored in the database for these fields.
My current workaround: To allow the storage of the select fields in question, I have disabled the code in ‘if ( ! value_exists )’ in the function ‘validate’ in library/fields/select.php.
My question: Is there a hook or another, better solution to disable the back-end validation of select fields? A solution that is “update-proof” (i.e. that still works after a plug-in update)? If not, would it make sense to have a ‘Disable back-end validation’ option in the settings of select fields? I guess I’m not the only one who needs to dynamically fill dropdown content from the back-end… 😉
Kind regards, Roger
The topic ‘Disable back-end validation of select fields’ is closed to new replies.