How to prepopulate phone number field with input mask

  • cmtoys
    Asked on May 29, 2015 at 9:53 PM

    Using the prepopulate.jotform.io app to prepopulate a form, I have a field that has a mask, specifically a phone number field with the input mask enabled. When I try to prepopulate it with the app, the form does not have the phone number pre-filled, no matter what form I use, e.g. all numbers, with or without parentheses, with or without dashes, etc.

    If I remove the input mask, it works fine. Is there a way to make this work, or do I have to choose? Thank you.

  • BJoanna
    Replied on May 30, 2015 at 5:25 AM

    I have cloned and tested your form and I was able to reproduce problem you mentioned. Phone number field is not populating when input mask is enabled.

    Possible workaround is to create text box field instead of phone field, then set validation of that field to be numeric and then add input mask to that field.

    How to prepopulate phone number field with input mask Image 1 Screenshot 30

    How to prepopulate phone number field with input mask Image 2 Screenshot 41

    Then when you use prepopulate app that field will be prepopulated even if input mask is turned on.

    Here is my demo form where I added text box field that is numerical with input mask. 

    http://form.jotformpro.com/form/51485162390960 

    Also prepopulate demo form:

    http://form.jotformpro.com/form/51485162390960?checkIn[month]=05&checkIn[day]=30&checkIn[year]=2015&checkOut[month]=05&checkOut[day]=30&checkOut[year]=2015&numberOf35=2&numberOf36=1&testPhone=1234567890 

    Feel free to clone it and test it.

    Hope this will help. Let us know if you need further assistance. 

     

  • cmtoys
    Replied on May 30, 2015 at 4:11 PM

    Thank you! It looks like this will work great. Is there any reason that the quicktools Phone field would be preferred over a masked text box like you describe above? The only thing I really see is some integrations (doesn't appear that any I use) may pass the Phone number, but they wouldn't know to pass this text box? 

  • Elton Support Team Lead
    Replied on May 30, 2015 at 6:53 PM

    @cmtoys 

    As far as I know they both work similarly with any integrations. They can be mapped with text boxes from the 3rd party apps since the value are passed as text not by field types. However, if you come across any issues, let us know and we'd be happy to assist you.

    By the way, I tried prepopulating phone number with input mask enabled and it seems working fine.

    http://form.jotformpro.com/form/51487624455967?name=john&phoneNumber19[full]=2322232321

    If it doesn't work with the prepopulate app, you can manually insert it on the generated URL. This guide will help: http://www.jotform.com/help/71-Prepopulating-the-fields-to-your-JotForm-via-URL-parameters

    If you need further assistance, let us know.

     

     

  • cmtoys
    Replied on May 30, 2015 at 11:38 PM

    Thank you again! I like using the app - it's easier for my staff, although the other option is good to know. The workaround using a text box and an input mask seems to be working fine though. Thanks for the speedy responses!

  • Elton Support Team Lead
    Replied on May 31, 2015 at 1:18 AM

    @cmtoys

    It's our pleasure to help. 

    Cheers! :)

  • BxClinic
    Replied on June 6, 2016 at 10:30 AM

    Hi there,

    I've just hit the same problem as the original poster; any chance this bug is going to be fixed please?

    Thanks,

    James

  • BJoanna
    Replied on June 6, 2016 at 12:16 PM

    @BxClinic

    I have moved your question to separate thread and we will provide you an answer there shortly. 

    https://www.jotform.com/answers/854515