Pull #example through with Get Form Url widget

  • srouse
    Asked on March 13, 2018 at 6:53 PM

    I have one form that I am using multiple times on one page. When the user clicks certain links, the form appears in a lightbox and a unique # is append to the url for that link. I would like to pull this hash through to the form submission. Is this possible?

  • Kiran Support Team Lead
    Replied on March 14, 2018 at 12:07 AM

    I understand that the forms will be loading on a lightbox with the URL appended #unique code and you want to capture the unique ID to the form, Is that correct? This can be possible by using the Get Form Page URL widget and a substring widget to separate the unique code. Please see the form below with an example that can help you with this.

    https://form.jotform.com/80719494248972#YourUniqueID

    Here is what I did to capture the Unique ID to a text box field.

    1. Add Get Form Page URL widget, a text box field and SubString widget to the form.

    2. Add a condition to read the URL from the Get Form Page URL widget to the textbox field as below:

    1520999898Selection 077 Screenshot 10

    3. Now, configure the Substring widget as shown below to capture Unique code from the text field.

    1521000322Selection 078 Screenshot 21

    The captured Unique ID will be displayed in the SubString field and stored in the form submissions.


    Hope this information helps!

  • srouse
    Replied on March 16, 2018 at 8:25 AM

    Hi thanks for this response. I tried implementing this set up but was unsuccessful because I'm still unable to get the #unique-id to pull through the get-url widget. It seems to ignore this part of the url and only pulls through http://example.com/page.html

  • Richie JotForm Support
    Replied on March 16, 2018 at 11:24 AM

    As what my colleague have said, the Get Form Page URL widget will capture the unique # when your user clicks a certain link and the substring will copy the unique# to the url link.

    I also checked your form and I can't seem to find the condition my colleague has given. Kindly add the condition to copy the value of the Get Page URL.

    Pull #example through with Get Form Url widget Image 1 Screenshot 20

    Kindly test it using the process you have given above, let us know how it goes.

    Thank you.


  • srouse
    Replied on March 17, 2018 at 10:50 AM

    Hi thanks for your response, I now have the condition setup but I am still getting unexpected results.

     1521298016Screen Shot 2018 03 17 at 10 Screenshot 101521298082Screen Shot 2018 03 17 at 10 Screenshot 21

    The #uniqueID is only pulling through the Get URL inconsistently. (I've only gotten it to pull through a handful of times.) Also, even after configuring the Substring widget, the full URL still pulls through. I am not as concerned about parsing the url for the unique ID with the Substring widget, I would just like the #UniqueID to pull through the Get URL widget consistently.

    Appreciate any further insight you can provide.

  • Jed_C
    Replied on March 17, 2018 at 1:41 PM

    I just tested my colleague's form http://www.jotformpro.com/form/80719494248972 and it's working fine on my end.

    1521308469get url Screenshot 10

    Which form are you working? Would you mind sharing to us the form URL for us to test? Or kindly confirm if this is the form you are working on http://www.jotform.us/form/80238193884162?

  • srouse
    Replied on March 17, 2018 at 4:26 PM

    The form url I am working on is https://form.jotform.com/80695754684170

  • Welvin Support Team Lead
    Replied on March 17, 2018 at 5:12 PM

    What is the actual URL that is fetched by the Get Page URL? Seems that is a local URL. Anyways, you need to count the actual characters.

    Example:

    This URL http://127.0.0.1:49356/dev/resources.html is 41 characters. You need to put 41 in the Substring start. You can put 100 or up in the Substring end.