Redirect on a page, if user under 18

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

This topic is: resolved

This topic contains 4 replies, has 2 voices, and was last updated by  beingo 1 day, 8 hours ago.

Viewing 5 posts - 1 through 5 (of 5 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 6 days, 22 hours 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

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Be inspired. © 2018 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy