Anatomy of an element's Field ID

  • rwaldenjr
    Asked on October 8, 2017 at 3:05 AM

    I'm having difficulty getting my forms' to prepopulate successfully. I've checked and double-checked the structure of the various element references in my URLs. And, they seem to be what's shown in the instructions, "How to automatically pass form data to another form". However, some of the fields preload data, and most of them don't.

    I was told by one of your colleagues that there must be something wrong with my URL statements. If so, I can't tell what it is. It occurs to me that maybe I misunderstand the naming convention used in the instructions. And if that's the case, I need a better explanation of what they contain. Please highlight the portion of these Field ID examples (below) so I can correct whatever I may be doing wrong.

    I'd also like to know the anatomy of the Field ID, and which part(s) to use in the prepopulate URL. Do I include the entire Field ID (without the "#" symbol) when referencing an element that has multiple fields (e.g., a name element, or an address element)? Why are all the IDs for some elements preceded by the word "input", and for others they're all different, like with Name fields? And, what do the numbers indicate? (I've figured out that the right-most number is the raid ID in a multi-selection element. But, what's the middle number stand for?)

    Thanks for your detailed explanation!

     

    Example 1:
      Name:  emailAddress6
      Field ID:  #input_6, #input_6_confirm

    Example 2:
      Name:  Name
      Field ID:  #prefix_138, #first_138, #last_138, #suffix_138

    Example 3:
      Name:  Phone
      Field ID:  #input_139_full

    Example 4:
      Name:  thisIs141
      Field IDs:  #input_30_0, #input_30_1

  • Mike
    Replied on October 8, 2017 at 11:03 AM

    For prepopulation we use the fiend {names} instead of the IDs. For example, if the field name is {fullName}, we can use the following names:

    {fullName} - to get the complete value
    {fullName:prefix} - to get the prefix value only
    {fullName:first} - to get the first name
    {fullName:middle} - to get the middle name
    {fullName:last} - to get the last name
    {fullName:suffix} - to get the suffix

    To get the individual names for the address field, please take a look at the next guide:

    How to Strip Headers from Postal Addresses in Email Alerts

    Example for name field:

    https://form.jotform.com/72804760234959

    Link added:

    https://form.jotform.com/72804466834968?name[prefix]={name:prefix}&name[first]={name:first}&name[middle]={name:middle}&name[last]={name:last}&&name[suffix]={name:suffix}

  • rwaldenjr
    Replied on October 8, 2017 at 3:38 PM

    Thanks for your reply Mike. But, you didn't really answer my questions. And, I don't see an explanation for what I'm asking in the "How to Strip Headers..." link you provided.

    I get that the "Name" element uses the format "elementName[prefix]" for Form 2, and "{elementName:prefix}" for Form 1. That particular element is explicitly specified in numerous JotForm instructions, including the one you sent me. Sadly, those are the only fields I'm able to consistently prepopulate. But, that still doesn't explain the naming convention or rationale for dissecting the segments of a Field ID so that I know which portion(s) to include in a prepopulate URL; especially for other multi-field elements like Address.

    In my Property Sellers Profile, the actual Field IDs for the "Name" element (see Example 2 in my previous message) are "prefix_138", "first_138", "last_138" and "suffix_138". However, the only portion of these two-segment IDs that are mentioned or included in the instructions for creating a prepopulaton URL are the first portions; the words "prefix", "first", "last" and "suffix". Do I also include the "_138" segment of the ID? And if not, how do I know which segment to use, since there's no explanation in any of the instructions about the different ways elements are identified?!? In some cases, the first portion is used, like with "Name". And in other cases, the last portion is used, like with checkbox arrays. What do you do when there's a three-segment Field ID? None of JotForm's instructions mention this discrepancy in Field ID nomenclature! Do you see my confusion?

    [For instance, in my previous Example 1, do I include the full "input_6", just the word "input", or "6"? In Example 3, I know I'm supposed to use the word "full" to indicate a one-field phone number. But, do I also include the word "input", and/or "139"? And with Example 4, the third segments, "0" and "1" are used to indicate the options for the checkbox array. But, do I also include the word "input", and/or "30"? I have a feeling that my misunderstanding how all this works is at the root of why my URLs keep failing, even though I've copied JotForm's generic examples to the tee!]

    Also, what coding language is it we're using to associate Form 1 and 2 elements when creating prepopulation URLs? Or, is it a proprietary JotForm code? I'd like to try edit my URLs with Notepad++ to hopefully make it easier to troubleshoot. And, I need to know what language filter to use.

    I look forward to further explanation of Field ID structure and prepopulation URLs, besides the misleading explanations given in instructions like "How to automatically pass form data to another form" which doesn't describe what I'm asking.

    Thanks!

  • Mike
    Replied on October 8, 2017 at 5:42 PM

    Unfortunately, we do not have another guide which outlines in depth the prepopulation.

    The naming convention for the name and address fields is similar. 

    To get submitted values of the address field:

    {address} - complete value
    {address:addr_line1} - address line 1
    {address:addr_line2} - address line 2
    {address:city} - city
    {address:state} - state
    {address:postal} - postal/zip code
    {address:country} - country

    address is the unique field {name} it depends on the field title. It can be different.

    Anatomy of an elements Field ID Image 1 Screenshot 40

    The following parameters are static, they are always the same:

    :addr_line1
    :addr_line2
    :city
    :state
    :postal
    :country

    So, if your address field has the {Property} unique name.

    Anatomy of an elements Field ID Image 2 Screenshot 51

    Use the next names:

    {Property:addr_line1}
    {Property:addr_line2}
    {Property:city}
    {Property:state}
    {Property:postal}
    {Property:country}

    In the prepopulation URL they may looks like this:

    ?Property[addr_line1]={Property:addr_line1}&Property[addr_line2]={Property:addr_line2}&Property[city]={Property:city}&Property[state]={Property:state}&Property[postal]={Property:postal}&Property[country]={Property:country}

    Property[addr_line1], Property[addr_line2], etc. - are the names of the second form in this example.

    For the name field.

    Anatomy of an elements Field ID Image 3 Screenshot 62

    Use the next names:

    {Name:prefix}
    {Name:first}
    {Name:last}
    {Name:suffix}

    The field IDs are not required.

    The language syntax in Notepad++ should not affect the functionality. Query string is a part the URL, so you may use the HTML syntax for example.

    I hope it helps a bit.

  • rwaldenjr
    Replied on October 9, 2017 at 10:01 AM

    I appreciate you trying to respond. But, this is getting really frustrating! I keep asking you guys about Field IDs, which are clearly used to create some of these prepopulation relationships, and I keep getting told about Name and Address fields. I can read that for myself. Does anyone there know the answers to my questions about Field IDs? Am I not asking clearly enough?

    I was told there must be a problem with my URL statement. Could somebody please look at one of my prepopulate URLs (e.g., Property Sellers Inquiry, Home Buyer Registration, Investor Registration Form, Renter Registration Form or Contractor Registration Form)?

    There must be something I'm fundamentally missing in my understanding of how this works. I'm prepopulating a lot more than just Names and Addresses. And, I need to understand how to properly identify all types of elements, not just the two types you keep referring to. Apparently, they don't all work the same because I've done all that, according to the Names and Address schema in the instructions, and they still aren't working correctly!

    I need to understand how to properly identify other types of elements than Name and Address, based on Field ID, especially if an element has more than one field. Please indicate the Form 1 and 2 references you'd use for the following element taken from one of my forms (as listed in my original post, above). Maybe that will help me understand the "rule" for properly identifying the gamut of element types and widgets.

     

    Example 1:

      Name:       emailAddress6
      Field IDs:  #input_6, #input_6_confirm
      Form 1:     
      Form 2:     


    Q1:  In Example 1 (above), do I include the entire Field ID - "input_6", the word "input", or just the "6"?

    Q2:  In Example 3 (see my original post), I'm supposed to use the word "full" to indicate a one-field phone number, according to the instructions. But, that hasn't worked! Do I also include the word "input", and/or "_139" when identifying the element (i.e., "input_139_full")? And, what do I use for a two-field element?

    Q3:  In Example 4 (see my original post), the last numerals of these three-part IDs (the "0" and "1") are used to indicate the checkbox array, according to the instructions. But, they aren't working either. Do I also include the word "input", and/or "30" when identifying the element (i.e., "input_30_0", or "input_30_1")?

     

    Thanks!

  • BJoanna
    Replied on October 9, 2017 at 12:50 PM

    Please note that you have to use Unique Name of your fields.

    Filed IDs are used to style the form using CSS codes. 

    Anatomy of an elements Field ID Image 1 Screenshot 20

    For the field with multiple input fields such as the address of name fields, you need a part of the Filed IDs that will be combined with the Unique Names. Here is an example for the address field (you need only red values):

    #input_4_addr_line1, #input_4_addr_line2, #input_4_city, #input_4_state, #input_4_postal, #input_4_country

    Here is my demo form: https://form.jotform.com/72815387635971 

    Feel free to test it. 

    On submit, data will be passed to the second form. 

    I used this prepopulate URL to pass the data from form one to form two:

    https://form.jotform.com/72815301435955?name2[first]={name3:first}&name2[last]={name3:last}&address2[addr_line1]={address1:addr_line1}&address2[addr_line2]={address1:addr_line2}&address2[city]={address1:city}&address2[state]={address1:state}&address2[postal]={address1:postal}&address2[country]={address1:country}

    You can also check out prepopulate app - http://prepopulate.jotform.io/ 

    And this guide:

    Prepopulating Fields to Your JotForm via URL Parameters 


    If you sill have issues to pass your data form one form to another, please provide us the links of both forms. 

  • rwaldenjr
    Replied on October 9, 2017 at 3:01 PM

    Is anybody there who can answer my question WITHOUT telling me how to use the "Name" element? Is anyone reading anything I've said?!? If you read the entirety of this thread (and not just my most recent reply), you'll see that several of your colleagues have all said the same things, and sent me the same demos and instructions. But, NONE of you have answered my questions!!! I'm not asking about the "Name" or "Address" fields!!! 

    Does the prepopulation URL only work for names and address fields? If not, then not all "Name" or "Address" elements have the simple Unique Name of "Name" or "Address" as shown in your instructions. And if they don't, how do I  identify them, because following your simple instructions for more complex Unique Names hasn't worked!

    If you don't know the answers to my many questions in this string, please pass the ticket on to a second level rep, or someone who does know the answer rather than wasting more time sending me the same non-answers, or me having to keep re-writing the same questions over and over and over.

    As you can tell, I'm very disappointed and frustrated with the lack of responsiveness to this question! Its seems so simple. Yet, everyone keeps sending me the stock answer and links, without ever reading or addressing the questions I've asked. Its like I'm talking to the wall! Clearly, sending me the same stuff over and over isn't going to suddenly make it start working! There must be something else I need to know that's not being said! Your team is always much more effective at being able to address my specific concerns than you've been with this problem!

  • Mike
    Replied on October 9, 2017 at 4:55 PM

    Example 1:

    Name:       emailAddress6
    Field IDs:  #input_6, #input_6_confirm
    Form 1:     
    Form 2:     

    Q1:  In Example 1 (above), do I include the entire Field ID - "input_6", the word "input", or just the "6"?

    Use the field name here {emailAddress6}.

    * The confirmation email input cannot be populated.

    Q2:  In Example 3 (see my original post), I'm supposed to use the word "full" to indicate a one-field phone number, according to the instructions. But, that hasn't worked! Do I also include the word "input", and/or "_139" when identifying the element (i.e., "input_139_full")? And, what do I use for a two-field element?

    Use the field name again.

    To illustrate this with your form https://form.jotform.com/71721807988166.

    Example:

    https://form.jotform.com/71721807988166?Phone[full]=1234567890
    or
    https://form.jotform.com/71721807988166?Phone[full]={phoneNumber}

    Notice missing square brackets [] within the field {name} you do not need to include them.

    Anatomy of an elements Field ID Image 1 Screenshot 20

    Correct:

    form.jotform.com/71721807988166?Name[prefix]={name3:prefix}&Phone[full]={phoneNumber}

    * If you turn off the Input Mask for the Phone field, the prepopulation format will be different.

    Q3:  In Example 4 (see my original post), the last numerals of these three-part IDs (the "0" and "1") are used to indicate the checkbox array, according to the instructions. But, they aren't working either. Do I also include the word "input", and/or "30" when identifying the element (i.e., "input_30_0", or "input_30_1")?

    I would like to suggest opening a separate thread for each question.

    Provide the form 1 link, the form 2 link and a field you are having the issues with.

  • rwaldenjr
    Replied on October 12, 2017 at 4:00 AM

    Mike -

    Not quite sure which form you used to point out brackets on the Form 1 side of the Phone string, but thanks for pointing it out. That actually wasn't one of my typical URLs. However, after a combination of your previous explanation and your last one, I was finally able to prepopulate using URLs on all forms.

    Unbelievable how long it took to troubleshoot though, and how difficult it was to get someone on your team to finally stop giving me boilerplate responses, and to look at my URLs to see what was wrong, as you finally did. I knew it wasn't as cut and dry as the instructions make it out to be. Once I understood the slight variations in how to apply query formatting to the elements I've used, such as Phone and Email, things fell into place.

    Might I suggest that your documentation team update your instructions for prepopulation to include examples that show a wider variety of element types than Name and Address? For instance, these are some of the issues I discovered that caused me trouble with prepopulating:

    1.  I had no idea that you don't use the word "full" after the Phone element name on the Form 1 side of the query;

    2.  You can't use the “#” symbol in a text box because it eliminates all text that comes after it;

    3.  The E-mail Validator widget can only pass the email address to Form 2 after its been verified; you can't bypass email verification, even if its not required.

    All these and a few other nuances caused me a great deal of trouble and wasted time! And, nothing I could find in any of the instructions or links you and your colleagues sent me described in detail how to query elements that are not Name or Address. Had I seen examples of such strings, I'd have had a much easier time programming my URLs, and saved your team a heck-of-a-lot of time answering my questions.

    Thanks for your assistance and persistence Mike!

  • Kevin Support Team Lead
    Replied on October 12, 2017 at 9:55 AM

    On behalf of my colleagues you're most welcome. 

    Thank you for your suggestion as well, we will take this into account and accordingly update the guide about fields pre-population so our users have clear how this process is done. 

    Let us know if you need further assistance, we will be glad to help you.