Help Concatenating Phone Number Field To Build URL

  • zoiglobal
    Asked on April 27, 2017 at 4:45 PM

    Hello.

    I am trying to dynamically build a url in Form 1 (https://form.jotform.us/71165639998172) to populate information on Form 2 (https://form.jotform.us/71161940176151).  

    I have successfully built the url up to the phone number.  How do I substring out the area code from the phone number to pass as two separate arguments in my url string?

    Here is the string portion that works correctly:  

    https://form.jotform.us/71161940176151?input44=Loyd%20Stephens&input46=101256&input73=%20whyw8@sbcglobal.net&input245=330987&input47=682%205183117

    Simply, I just need the phone number pieces.  Kindly advise.

    Denise

  • Kevin Support Team Lead
    Replied on April 27, 2017 at 6:50 PM

    You could get each separated value with the code below, the highlighted part is the field's name that can be found following this guide.

    {phoneNumber:area}

    {phoneNumber:phone}

    To capture the data you could do it like this: 

    phoneNumber[area]

    phoneNumber[phone]

    This is the same with all other fields that contain multiple sub-fields, to get each name you could also right click on the field while previewing it and then get each sub-field name: 

    Help Concatenating Phone Number Field To Build URL Image 1 Screenshot 20

    Hope this helps. 

  • zoiglobal
    Replied on April 27, 2017 at 8:52 PM

    Kevin,

    Thank you for your response.  Yes, I am aware of how and where to find the value needed to place in the string.  But, what I don't know is how to type it in the Calculate A Fields Value in the conditions. 

    Here are images 1, 2, and 3 showing what the conditions Calculate A Field area does to my typed in information.

    Please help.

    DHelp Concatenating Phone Number Field To Build URL Image 1 Screenshot 40Help Concatenating Phone Number Field To Build URL Image 2 Screenshot 51Help Concatenating Phone Number Field To Build URL Image 3 Screenshot 62

  • jonathan
    Replied on April 28, 2017 at 12:36 AM

    To be able to capture the data of the Phone field into separate entity, you need to put them first to 2 separate fields (a hidden field can be used as the repository)

    You will be able to use then the Area field and Phone field in the Calculation widget.

    Please correct if I have misunderstood what was needed.

    ---

    The images you uploaded were not included so we were not able to view the shared images.

    To include images in your response, use the Insert/Edit Image tool in the message editor.

    See image below on what I meant.

    Help Concatenating Phone Number Field To Build URL Image 1 Screenshot 20

     

     

     

  • zoiglobal
    Replied on April 28, 2017 at 4:20 PM

    How do you assign a hidden field a value from a field like phone number or name?

  • Welvin Support Team Lead
    Replied on April 28, 2017 at 5:02 PM
  • zoiglobal
    Replied on April 28, 2017 at 9:21 PM

    I'm not being understood and I know it is me and my question structure.  The example you gave is JotForm 101.  Thank you for trying, but I need to understand how to place the area code of a phone number in one hidden field and the phone number portion of the phone number in another hidden field. 

    Does that make sense?  My whole issue revolves around the double value fields and separating the values in their own field.  I understand how to do it in an email and I understand the concept.  But, I don't know how to use conditions to parse the double fields, like name and phone number, and put the parsed values in their own fields for using in condition calculation.

     

    D

  • BJoanna
    Replied on April 29, 2017 at 1:17 AM

    If I understood you correctly you want to pass value from phone number field of one form to phone number field of a another form. 

    To achieve that, like my colleage Kevin_G mentioned you will have to separate values of area field and phone field. 

    Here is my demo form: https://form.jotformpro.com/71180365172957 

    Feel free to test it and clone it.

    This is the Pepopulated URL that I added on thank you page of the first form.

    https://form.jotformpro.com/71180690972966?phoneNumber[area]={phoneNumber3:area}&phoneNumber[phone]={phoneNumber3:phone}

    You can also check this guide: 

    https://www.jotform.com/help/351-How-to-Automatically-Pass-Form-Data-to-Another-Form 

     

    Let us know if you need further assistance.

  • zoiglobal
    Replied on May 3, 2017 at 5:58 PM

    BJoanna,

    No. I DO NOT want to pass it to another form, initially.  I fully understand how to do that.  What I am trying to do is build a full URL with appropriate arguments in the url string.  But, as I stated, I am not passing this to another form, initially.  Instead, I am going to use created string as forwarding domain address for each of our distributors to be the referring business owner.  Each distributor's domain name will then forward to a form.

    To that end, I am trying to build string in calculation widget.  That is where I am experiencing difficulty with double-field widgets.

    I hope this brings more clarity so I can get an solution.

     

    Denise 

  • Kevin Support Team Lead
    Replied on May 3, 2017 at 7:10 PM

    Thank you for the clarification Denise. 

    Unfortunately, with the Form Calculation widget you cannot get separated values from your sub-fields, for example, you could get each sub-field value from the phone number field as I explained on my first reply above. 

    If you would like to get separated fields and generate a custom link using the Form Calculation widget or conditions, then you would need to use a "Short Entry Field" and display them inline. 

    This guide will help you to change the default fields position: Form-Field-Positioning