Home › Forums › Quform WordPress › Redirect on a page, if user under 18
- This topic has 5 replies, 2 voices, and was last updated 6 years, 9 months ago by
Ally.
- AuthorPosts
- February 9, 2019 at 9:38 pm #28483
beingo
ParticipantWould it be possible to point to a page after displaying the error message “‘You must be 18 or older to continue”
in the following code function.php?
“add_filter(‘quform_element_valid_8_210’, function ($valid, $value, $element) {
if ($valid) {
$age = date_diff(date_create($value), date_create(‘now’))->y;if ($age < 18) {
$element->addError(‘Nous ne sommes pas en mesure de poursuivre.<br>Vous devez avoir au moins 18 ans pour vous inscrire.’);
$valid = false;
}
}return $valid;
}, 10, 3);”thank you for helping me
hide- This topic was modified 6 years, 9 months ago by
beingo.
February 10, 2019 at 12:22 pm #28504Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
February 10, 2019 at 1:48 pm #28509beingo
ParticipantThank you very much, thank you!
February 10, 2019 at 1:49 pm #28510beingo
ParticipantThank you very much, thank you!
Topice RESOLVEDFebruary 15, 2019 at 11:35 am #28556beingo
ParticipantHello
Redirection works well on Chrome.
On internet explorer, this does not take into account.
Redirection is not doneFebruary 18, 2019 at 1:46 pm #28587Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- This topic was modified 6 years, 9 months ago by
- AuthorPosts
- You must be logged in to reply to this topic.
