- srouseAsked on March 13, 2018 at 06: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?
- JotForm SupportKiranAnswered 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.
Here is what I did to capture the Unique ID to a text box field.
2. Add a condition to read the URL from the Get Form Page URL widget to the textbox field as below:
3. Now, configure the Substring widget as shown below to capture Unique code from the text field.
The captured Unique ID will be displayed in the SubString field and stored in the form submissions.
Hope this information helps!
- srouseAnswered on March 16, 2018 at 08: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
- JotForm SupportRichie_PAnswered 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.
Kindly test it using the process you have given above, let us know how it goes.
- srouseAnswered 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.
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.
- JotForm SupportJed_CAnswered on March 17, 2018 at 01:41 PM
- srouseAnswered on March 17, 2018 at 04:26 PM
The form url I am working on is https://form.jotform.com/80695754684170
- JotForm SupportWelvinAnswered on March 17, 2018 at 05: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.
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.