Popup not working in WP

Home Forums Quform WordPress Popup not working in WP

This topic is: resolved
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #31514
    felixvelarde
    Participant

    Hello. The popup in the following page doesn’t work – I’ve unloaded all non-QuForm JS code on this page, tried disabling all the other plugins including WP-Rocket, Boxzilla, SEO etc. Still no joy. Any ideas?

    https://2y3x.com/uncategorized/test-for-popup/

    Thanks!

    #31517
    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.

    #31519
    felixvelarde
    Participant

    Thanks Ally – I got it working in the end. It was my fault, conflict with a separate JS.

    I am struggling with getting the User Registration to add the user role to the newly registered user – I’m using the code you suggested but while FirstName and LastName are updating, Role isn’t. Can you show me where I’ve got it wrong please? Much appreciated!

    This is the page:
    https://2y3x.com/videos/lockdown22052020/

    add_filter(‘quform_element_valid_7_4’, function ($valid, $value, Quform_Element_Field $element) {
    if (username_exists($value)) {
    $element->addError(‘This username is already taken’);
    $valid = false;
    }

    return $valid;
    }, 10, 3);

    add_filter(‘quform_element_valid_7_7’, function ($valid, $value, Quform_Element_Field $element) {
    if (email_exists($value)) {
    $element->addError(‘This email is already registered’);
    $valid = false;
    }

    return $valid;
    }, 10, 3);

    add_action(‘quform_post_process_7’, function (array $result, Quform_Form $form) {
    $username = $form->getValueText(‘quform_7_4’);
    $email = $form->getValueText(‘quform_7_7’);
    $password = $form->getValueText(‘quform_7_5’);

    $userId = wp_insert_user(array(
    ‘user_login’ => $username,
    ‘user_pass’ => $password,
    ‘user_email’ => $email
    ));
    update_user_meta($userId, ‘first_name’, $form->getValueText(‘quform_7_3’));
    update_user_meta($userId, ‘last_name’, $form->getValueText(‘quform_7_9’));
    update_user_meta($userId, ‘role’, $form->getValueText(‘quform_7_8’));
    wp_signon(array(
    ‘user_login’ => $username,
    ‘user_password’ => $password,
    ‘remember’ => true
    ));
    return $result;
    }, 10, 2);

    #31528
    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.

    #31534
    felixvelarde
    Participant

    Thank you, that works 🙂

Viewing 5 posts - 1 through 5 (of 5 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