Redirect on a page, if user under 18

Home Forums Quform WordPress Redirect on a page, if user under 18

This topic is: resolved
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #28483
    beingo
    Participant

    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

    • This topic was modified 5 years, 2 months ago by beingo.
    #28504
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #28509
    beingo
    Participant

    Thank you very much, thank you!

    #28510
    beingo
    Participant

    Thank you very much, thank you!
    Topice RESOLVED

    #28556
    beingo
    Participant

    Hello
    Redirection works well on Chrome.
    On internet explorer, this does not take into account.
    Redirection is not done

    #28587
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy