Hi @mercilesss
You can try this snippet and see whether it helps:
https://gist.github.com/wpmudev-sls/5be15261d7f8835acda5a50dc3e3e46f
The above snippet will show up the verification message when the form is submitted.
In the given snippet, you’ll need to update the following line:
private $field = 'date-1';
// Form ID to validate
private $form_id = 607;
// Is necessary to have this minimum age or more to be able to do the submission
private $minimum_age = 55;
// Default message for the users with less than minimum age necessary
private $message = 'You must be 55 or older to join the club!';
Where “date-1” would be the ID of the date picker Field, the 607 would be the form ID which needs to be updated to your form ID and the 55 would be the minimum age which can be changed to 21.
The $message in the above would be the error text which would appear after submission.
Could you please check and see whether the above code helps? You can apply the code as a mu-plugins.
Please check this link on how to implement the above code as a mu-plugins:
https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins
I can confirm the code works when tested. Please do let us know if you have any further queries.
Best Regards,
Nithin
Hello @mercilesss,
Hope you’re doing great!
As we haven’t heard from you for some time now, I’ll be marking this thread as resolved. Please feel free to ref-open it, if you still need our help.
Best Regards,
Dmytro