-
YempoAsked on August 2, 2019 at 10:30 PM
Hi, I'm using the fullname field type in a form and want to prepopulate it. The field name is {name} - how do I access firstname and lastname separately? Screenshot attached. Many thanks.
-
Augustine_OReplied on August 2, 2019 at 11:28 PM
Hello,
Sorry, I think the UNIQUE NAME option is focused on the field generally, but you can access the subfields (Firstname and Lastname) right on the Full Name Properties as shown below:
I am sure these options can help you work out something on individual subfields comfortably. Please, do let us know what comes up.
Thanks.
-
YempoReplied on August 2, 2019 at 11:31 PM
Thanks, but I need to extract them to use in a url. For example {name} can be used for prepopulation. How do I access the 2 elements of the name field in code? If I look into your help guide:
https://www.jotform.com/help/71-Prepopulating-Fields-to-Your-JotForm-via-URL-Parameters
It provides this example which LOOKS LIKE it does what I want to do - eg name[first] and name[last], however this didn't work for me.
-
Augustine_OReplied on August 2, 2019 at 11:52 PM
Hello,
Kindly hold on a little bit and a Customer Support will be with you soon. I'm sorry, I could not get my hands around this, but I'm very sure there is a way to have it fixed.
Just stay tuned.
Thanks and all the best.
-
Jed_CReplied on August 3, 2019 at 3:43 AM
If you are referring to this form https://www.jotform.com/92051467972463, it should be name[first] and name[last].
ex.
https://www.jotform.com/92051467972463?name[first]=Steve&name[last]=Smith
Another easy way of doing it is by using Jotform's prepopulate tool app here https://prepopulate.jotform.io/. Just fill the field with whatever value you want and click on "Generate URL". That is helpful if you have a lot of fields to prepopulate.
I hope that helps. Let us know if you have any questions or if you need further assistance.
-
YempoReplied on August 7, 2019 at 12:50 AM
Hi, thanks for your reply but I'm still having problems. Note that I can't use the pre-population tool, I need to build the URL on the fly.
I've now moved the URL from the PDF to the Email as I thought it would be easier, and definitely easier to debug.
Here is the scenario.
Candidate fills in this form:
On Submission, email is sent to recipient and a URL is generated that the recruiter can click on to load a new form with parameters to pre-populate. The code in the email is:
Hi {hiddenRecruiter}, you've received a new application from {preferredName}. Click here to progress them to the next stage.
https://form.jotform.me/92120745670454?PreferredName={preferredName}&LastName={name[Last]}
The code in red is what isn’t working. The URL that is generated on the fly is:
https://form.jotform.me/92120745670454?PreferredName=Michelle&LastName=Michelle FiegehenEg the {name[last]} is not extracting the last name from the name field.
Thanks.
https://form.jotform.me/92131177992462https://form.jotform.me/92131177992462
-
Jed_CReplied on August 7, 2019 at 2:24 AM
I see what you mean. My last name was on the First name field instead in Last name field.
You can replace it with the following URL:
Sample output:
Here's how it looks in your Autoresponder.
I hope the URL I've provided above helps. Let us know if you have any questions or if you need further assistance.
-
YempoReplied on August 8, 2019 at 2:21 AM
Hi again, I'm so sorry but I still can't get this working. The URL you provided worked okay but used the wrong form. I've updated it (and simplified the form for troubleshooting purposes) but I still can't get the last name and first name to pass into the new form. (Note I can't use your prepopulation tool as I need to generate the URL on the fly.
So this form: https://form.jotform.me/92131177992462
Has this code in the "send to recruiter autoresponder":
Which works if I remove the name segments, but fails if I leave it in. The URL it generates for me is:
which is all correct except the name fields. My original problem still stands - I can't seem to access name[first] and name[last].
thanks again.
Michelle
-
Victoria_KReplied on August 8, 2019 at 3:50 AM
Here is the link, which should be correct.
https://form.jotform.me/92120745670454?PreferredName={PreferredName}&name[first]={name:first}&name[last]={name:last}&email={email}
Please note how name subfields were added to generate the link. Basically, name is the unique name, which you get from field properties, and first/last are constant values for the fullname element, you can add those to fetch values from any other fullname field.
-
YempoReplied on August 8, 2019 at 4:37 AM
Hi Victoria, thanks for the prompt reply. I was very excited to see your code, which is different from all the other people who have tried to assist me. Unfortunately, it fails, generating this url:
https://form.jotform.me/92120745670454?PreferredName=sez&name[first]=&name[last]=&email=sarah.johnson@yempo-solutions.comThe {name:first] is still not recognized.
Michelle
-
Jed_CReplied on August 8, 2019 at 5:05 AM
It is not working because the URL you have in your "Send to recruiter" notification is different. Below is what I see in the URL.
https://form.jotform.me/92120745670454?PreferredName=%7bPreferredName%7d&name%5bfirst%5d=%7bname:first%7d&name%5blast%5d=%7bname:last%7d&email=%7bemail%7d
I just updated the URL in your notification so please test your form again. I just cloned your form and it's working on my end.
ex.
Let us know if you need further help.
-
YempoReplied on August 8, 2019 at 7:17 AM
Hallelujah, that works! I have had so much incorrect information along the way. The only thing that worries me is the garbled URL you were able to see, when it looked perfect in my system.
thanks anyway for solving this very challenging problem!