You are viewing limited content. For full access, please sign in.

Question

Question

Populating a Form with URL Parameters - fields only populate upto a space

asked on February 3, 2023

I've created a link that will populate data in a form.

The issue is that it only populates the first word of a field.

For example:  If my field is :

{/dataset/Reason_for_Stop_Payment__1} 

and the data entered is "My reason is this and that"

the form only populates with the first word "My". It's the same issue for each field. 

Here is my code:

https://lfweb.tompkins-co.org/Forms/my2GR?Payee_First_Name_={/dataset/Payee_First_Name_}&Payee_Last_Name_={/dataset/Payee_Last_Name_}&Check_Date_={/dataset/Check_Date_}&Check_Number_={/dataset/Check_Number_}&Check_Amount_={/dataset/Check_Amount_}&Reason_for_Stop_Payment_={/dataset/Reason_for_Stop_Payment__1}

Laserfiche is capturing the information, it's just not populating on the form through the link.

 

 

 

0 0

Answer

SELECTED ANSWER
replied on February 3, 2023 Show version history

Yep, just as I thought, it's not an <a> element, it's just plain text.  So it's not a link, you are seeing your email program try to create a link from the text and the email program doesn't know where it ends, so it ends it at the first space it finds.

You need to have it set-up as an actual link in your email.  Not only will this solve your problem with the spaces, but it'll also look cleaner, because we can do a different label on the link than the actual URL (I've done "Open the Form" in the example below).

Here's the exact text you posted, but with the URL modified to function as a link (an <a> element) instead of text.  You should be able to just copy/paste this right into the HTML view of the Email Service Task within forms.

</p><p class="MsoNormal"><span style="font-size: 10.5pt; font-family: &quot;Open Sans&quot;, sans-serif; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">Please click the following link to review this request:&nbsp;</span><o:p></o:p><span style="font-size: 14px;"><a href="https://lfweb.tompkins-co.org/Forms/my2GR?Payee_First_Name_={/dataset/Payee_First_Name_}&amp;Payee_Last_Name_={/dataset/Payee_Last_Name_}&amp;Check_Date_={/dataset/Check_Date_}&amp;Check_Number_={/dataset/Check_Number_}&amp;Check_Amount_={/dataset/Check_Amount_}&amp;Reason_for_Stop_Payment_={/dataset/Reason_for_Stop_Payment__1}" target="_blank">Open the Form</a></span></p><p class="MsoNormal"><o:p></o:p></p><br><p class="MsoNormal"><br></p><p class="MsoNormal"><br></p><p class="MsoNormal"><br></p>

 

Tip - When you are writing a post, use the "code" button (shows {....} and the word code) in the post editor to do code posts like that, which are usually easier to read on the screen.  Then when you are reading a post, use the "view source" button (looks like a paper with < and > sumbols on them) to see the code in a format that is easier to copy from.

2 0

Replies

replied on February 3, 2023 Show version history

How are you creating this link?  Is it in a custom HTML element, in Javascript, in an email activity, or in something else?

Because it sounds like it is not properly encoding the variable values in the URL. In the URL, you should see the spaces in the variable replaced with %20, but if that isn’t happening it isn’t going to interpret the URL parameters correctly.

0 0
replied on February 3, 2023 Show version history

It's created in an email activity and the email is sent to the user.

The link that is created on the email, stops when it comes to a space.

In this example, the First Name entered is "Tom Jr."

As a result of the space between Tom and Jr. the link stops after Tom.

The user could copy and paste the entire URL and it works fine but it should be a clickable link.

 

 

0 0
replied on February 3, 2023

If you are using the Email Service Task within forms, there should be tabs for Visual view and HTML view.  Can you share the HTML view on your form?

It should look something like this: 

Please click the following link to review the request: <a href="https://lfweb.tompkins-co.org/Forms/my2GR?Payee_First_Name_={/dataset/Payee_First_Name_}&Payee_Last_Name_={/dataset/Payee_Last_Name_}&Check_Date_={/dataset/Check_Date_}&Check_Number_={/dataset/Check_Number_}&Check_Amount_={/dataset/Check_Amount_}&Reason_for_Stop_Payment_={/dataset/Reason_for_Stop_Payment__1}" target="_Blank">LINK TO REVIEW REQUEST</a>

Since your form is publicly available, I just tried that from a test form of mine, just using different variables from my test form, and the link opened your form and populated the fields as I expected, with the spaces included.  That shows it should be working, which is why I want to see your HTML, to see what is different.

The fact that your screenshot shows the link coloring on only part of the text makes me think that you just have the URL as text and not as an actual <a> element to create the link.

0 0
replied on February 3, 2023

</p><p class="MsoNormal"><span style="font-size: 10.5pt; font-family: &quot;Open Sans&quot;, sans-serif; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">Please click the following link to review this
request:&nbsp;</span><o:p></o:p><span style="font-size: 14px;">https://lfweb.tompkins-co.org/Forms/my2GR?Payee_First_Name_={/dataset/Payee_First_Name_}&amp;Payee_Last_Name_={/dataset/Payee_Last_Name_}&amp;Check_Date_={/dataset/Check_Date_}&amp;Check_Number_={/dataset/Check_Number_}&amp;Check_Amount_={/dataset/Check_Amount_}&amp;Reason_for_Stop_Payment_={/dataset/Reason_for_Stop_Payment__1}</span></p><p class="MsoNormal"><o:p></o:p></p><br><p class="MsoNormal"><br></p><p class="MsoNormal"><br></p><p class="MsoNormal"><br></p>

0 0
SELECTED ANSWER
replied on February 3, 2023 Show version history

Yep, just as I thought, it's not an <a> element, it's just plain text.  So it's not a link, you are seeing your email program try to create a link from the text and the email program doesn't know where it ends, so it ends it at the first space it finds.

You need to have it set-up as an actual link in your email.  Not only will this solve your problem with the spaces, but it'll also look cleaner, because we can do a different label on the link than the actual URL (I've done "Open the Form" in the example below).

Here's the exact text you posted, but with the URL modified to function as a link (an <a> element) instead of text.  You should be able to just copy/paste this right into the HTML view of the Email Service Task within forms.

</p><p class="MsoNormal"><span style="font-size: 10.5pt; font-family: &quot;Open Sans&quot;, sans-serif; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">Please click the following link to review this request:&nbsp;</span><o:p></o:p><span style="font-size: 14px;"><a href="https://lfweb.tompkins-co.org/Forms/my2GR?Payee_First_Name_={/dataset/Payee_First_Name_}&amp;Payee_Last_Name_={/dataset/Payee_Last_Name_}&amp;Check_Date_={/dataset/Check_Date_}&amp;Check_Number_={/dataset/Check_Number_}&amp;Check_Amount_={/dataset/Check_Amount_}&amp;Reason_for_Stop_Payment_={/dataset/Reason_for_Stop_Payment__1}" target="_blank">Open the Form</a></span></p><p class="MsoNormal"><o:p></o:p></p><br><p class="MsoNormal"><br></p><p class="MsoNormal"><br></p><p class="MsoNormal"><br></p>

 

Tip - When you are writing a post, use the "code" button (shows {....} and the word code) in the post editor to do code posts like that, which are usually easier to read on the screen.  Then when you are reading a post, use the "view source" button (looks like a paper with < and > sumbols on them) to see the code in a format that is easier to copy from.

2 0
replied on February 3, 2023

Thank you so much, this worked perfectly and more importantly I understand why!

1 0
replied on February 3, 2023

I'm so happy to hear that.  smiley

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.