Normal Phone Mask

Home Forums Quform WordPress Normal Phone Mask

This topic is: not resolved
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #36238
    vsexmogushiy
    Participant

    Hello, how I can add mask: +1 (XXX) XXX-XX-XX?
    Your instruction — https://support.themecatcher.net/quform-wordpress/guides/advanced/adding-a-masked-input-field by 2013 doesn’t work!

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

    #36243
    vsexmogushiy
    Participant

    1. Yes, I saw it, tell me for my mask, what is the correct regular expression to check +1 (000) 000-00-00? I think the reason is not sending a regular expression.

    <abbr title=”HyperText Markup Language”>

    add_filter(‘quform_element_valid_1_3’, function ($valid, $value, Quform_Element_Field $element) {
    if ( ! preg_match(‘/^\(\d{3}\) \d{3}\-\d{4}$/’, $value)) {
    $element->addError(‘Enter a phone number in the format (000) 000-0000’);
    $valid = false;
    }

    return $valid;
    }, 10, 3);
    </abbr>

    2. How do I send the value from this field also in the same mask? That is, so that it is not +1000000000, but +1 (000) 000-00-00?

    3. And a big request to suggest how you can add the sender’s city when sending the form (naturally determined by the ip address)?

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

    #36264
    vsexmogushiy
    Participant

    Thank you very much.

    Tell me another question, how is it possible to mark the form if the same form is used in different places on the site. In order to understand which form the user clicked on (header, footer, page body)? Or do you need to create 3 separate forms for these purposes?

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

    • This reply was modified 12 months ago by Ally.
    #36270
    vsexmogushiy
    Participant

    Thank you so much for the answer. You’re one of the best support teams I’ve ever met. With your permission, I will describe my case, I will be immensely grateful for detailed answers.

    1. How to write dynamic parameters to me and how best to arrange it for me if I use several 3 – 5 places on my site where the same form is displayed. I add a div, and I add a form inside and I can assign each div a class and an id. Approximately by the following construction: <div class="1" id="place_1">[quform id="2" name="XXX"] </div>.How do I create a dynamic field with this separation?

    2. How do I add a link to the page from which the form came?

    3. Is it possible to determine in some way depending on the screen size from which device the application came. Desktops, Tablets and Phones?

    #36273
    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 8 posts - 1 through 8 (of 8 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