This topic is: resolved
- This topic has 5 replies, 2 voices, and was last updated 6 years, 5 months ago by .
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- You must be logged in to reply to this topic.
Home › Forums › Quform WordPress › Redirect on a page, if user under 18
Would 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
You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
Thank you very much, thank you!
Thank you very much, thank you!
Topice RESOLVED
Hello
Redirection works well on Chrome.
On internet explorer, this does not take into account.
Redirection is not done
You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.