-
rwaldenjrAsked on July 1, 2020 at 1:49 AM
I'm trying to auto-fill the Firstname field into a friendly greeting in the Autoresponder emails for my "Create An Account" form. I've already modified the table in the form. But, I've tried numerous versions of the field ID for the Firstname field. And, nothing seems to work. Could somebody please give me the proper syntax to use for this?
I tried using the methods suggested by Jimjotform and Ben from a Forum thread in 2016. But, Jimjotform's method just plain didn't work for me. And, Ben's suggestion assumes that the Form Fields selector can see the individual fields within the Name element, which it can't.
[Note: I've run into a similar problem before where JotForm can't see fields in an element. Please make a user suggestion that JotForm needs an upgrade so that your wizards and widgets can see all the fields on a form, and not just the macro elements!]
Thanks!
-
Bojan Support Team LeadReplied on July 1, 2020 at 6:35 AM
Greetings and thank you for your message.
To get the name in the Autoresponder, you need to use the following {name3}. This will replace the full name user has entered.
If you need to get only some information, you can use one of the following:
- First name: {name3:first}
- Last name: {name3:last}
- Suffix: {name3:suffix}Please let us know if this works for you.
-
rwaldenjrReplied on July 2, 2020 at 3:24 PM
Bojan_J -
Thanks for your explanation. However, as I said previously, I've tried every iteration of the individual name fields' selectors that I can think of, all without success (e.g., {name3:first}, {name3:#name_3}, {name3:name_3}, {#name_3} and {name_3}). I even tried the full name ({name3}), as you indicated. Nothing seems to work! Maybe you could try a cloned version of my form to see if there's something else going on that I'm not aware of. Something must be preventing this simple programming statement from working......
-
rwaldenjrReplied on July 2, 2020 at 3:45 PM
Okay, never mind. I cleared my cache and tried again, and it seems to be working now using the syntax that you listed. Thanks for your help!
However, how would I have known that particular syntax? When looking in the "Full Name Properties|Advanced|Field Details|Field IDs" tab, the field identifiers are shown to be "#prefix_3", "#first_3", "#last_3" and "#suffix_3". I'm not a master CSS coder. But, according to typical CSS programming methods, I'd never have thought to shorten "#first_3" to just "first"!?! That's not even what some of the Help Guides I've read say. Are there any rules for how to properly identify selectors in JotForm?
-
Welvin Support Team LeadReplied on July 2, 2020 at 7:07 PM
You should copy the unique name.
https://www.jotform.com/help/146-How-to-Find-Field-IDs-and-Names
Then just append colon followed by the box names as given by my colleague.
That's not a selector for the CSS, but a unique name for the field. That's used for third party integration or through API.
Here's a use case: https://www.jotform.com/help/51-How-to-Post-Submission-Data-to-Thank-You-Page.
Thanks
-
rwaldenjrReplied on July 2, 2020 at 7:38 PM
Thanks for clarifying the difference between the Field ID and the CSS selector, Welvin! I was never really clear on that. However, according to the Help Guide you sent, the Field IDs for the Name field on my form would be "first_3", "last_3", etc., not "first" and "last" as Bojan_J suggests. That would lead me to have tried "{name3:first_3}" etc., which I did try (unsuccessfully). What am I missing here? Is there some other Help Guide that clearly describes the method JotForm uses to extrapolate its data syntax from the Field IDs?
-
Jed_CReplied on July 2, 2020 at 11:33 PM
Those values after the colon : are fixed. So that would be :first for First Name, :last for Last Name, :suffix for suffix and :prefix for prefix.
The only thing that changed is the unique name. For example, right now your full name field is using name3, if you add another full name field it can be name4, name5 and so on. That's what you see on the unique name section which might changed or can be changed.
We don't have a guide for that, sorry about that.
-
rwaldenjrReplied on July 3, 2020 at 1:41 AM
Thanks Jed_C! That explains a lot. If they're fixed values, guess I'll just have to try and remember them. All though, while there may not be a "Guide" to explain them, seems to me I recall there being a document or Help page that lists many of these short codes as reference!?! If something like that exists, could you please attach it to a follow-up response?
Thanks again for you and your colleagues' help!
-
Vanessa_TReplied on July 3, 2020 at 4:26 AM
Unfortunately, we do not have a guide that mentions about that, however, you can instead bookmark this ticket link for reference:
https://www.jotform.com/answers/2422525
Let me also summarize it in here so you don't have to read the entire ticket.
To extract values within a Full Name field, please use the format:
{uniqueName:attribute}
Guide to get the unique name: How-to-Find-Field-IDs-and-Names
List of attributes:
prefix
first
middle
last
suffix
-
rwaldenjrReplied on July 4, 2020 at 3:57 AM
Thanks for the tips Vanessa; very helpful! I been using the Field IDs routinely with CSS. And, I've been able to use Unique Names for passing data back and forth between forms and databases as well. (All though, I've found that a bit more touchy to program than CSS.)
What I'm unsure of is the proper syntax to use to specify particular fields in other multi-field elements I might use in the future, besides the Name element which you've explained thoroughly. Since you don't have a list of them in a Guide, is there some rule we can use to specify individual fields (e.g., strip off the special characters and numerals from a Field ID)?
-
Sam_GReplied on July 4, 2020 at 5:42 AM
Hi Rwaldenjr,
There is no rule to specify the individual fields.
To add info:
Use the next names:
{Name:prefix}
{Name:first}
{Name:last}
{Name:suffix}
The following parameters are static, they are always the same:
:prefix
:first
:last
:suffix
I hope this helps.
Let us know if you need further assistance.
-
rwaldenjrReplied on July 4, 2020 at 4:23 PM
Thanks Sam_G -
That's pretty much what your colleagues have said. So, how would I determine the proper syntax to use for other multi-field elements in the future (like Address, etc.) without being able to determine them from a table or guide? Do we have to write and ask you guys each time? (Sounds like a user request for possible Help Guide documentation is needed to cover Unique Field Names for individual fields of all multi-field JotForm elements and widgets. Either that, and/or the Dev team needs to upgrade the "Properties|Advanced|Field Names" window to include unique field names as well as the element name.)
Have a nice weekend!
:-) -
Eduardo_HReplied on July 4, 2020 at 5:56 PM
Hi Rwaldenjr,
Thank you for your suggestion. I'll raise this request for evaluation. You'll be posted here if there is an update on this matter.
That said, you can extract a method for finding the unique names of multiple fields' elements from this support article:
Guide: Prepopulating-Fields-to-Your-JotForm-via-URL-Parameters
According to this, you'll find the unique name on the HTML name attribute of each element.
So if you look for the city on an address element, for example, you'll find something like this: name=q3_address[city] (see image below)
Converting it for e-mail templating, you'll have: {address:city}
You can apply the same logic for different multiple field elements, like Full Name or Multi-Line questions.
I hope that was helpful. We wish you a great weekend too. :)
-
rwaldenjrReplied on July 4, 2020 at 10:02 PM
Eduardo -
Yes, that's very helpful. Thank-you! Obviously, it's a rather round-about way of getting the information, all though it works. Hopefully, someone on the Dev team can devote the resources to write an upgrade to the element Properties tab so that this information can be easily displayed the same way the Unique Name and Field IDs are shown.
-
Flavio_AReplied on July 4, 2020 at 10:12 PM
Hi @rwaldenjr
Great to know it was helpful. This issue was already escalated to our developers and you will be informed here once we have any updates.
Please let us know if you have any question in the meantime.