I have created a form with a name field and I wish to address the email to the person who's filled in the form. If I use the name field, in this case [6] it uses the whole name. Is there a way to access just the first name?
Hi,
If you're using the field [6] in an email and/or in a message displayed after the form is submitted, you can use:
[6 show="first"]
Hope this helps! :)
Ugh, that's too simple. I like my overly complex solution better 🙂
So do I, tbh. But you should still upvote mine. I'm angling for the "No-Code Hacker Mittens" from the schwag store. 😛
Done. May the Schwag be with you.
Perfect, exactly what I was hoping would be the answer. Strange that it's not in the documentation.
So it is, just not where I expected it to be! I was looking in the email notification docs.
If 6 is a user ID field, reference this: https://formidableforms.com/knowledgebase/user-id/#kb-display-user-id-fields
I'm thinking the field Tom's referring to is the Name field in the Form Builder.
[6 show="first"] Will do the trick in email actions and submission confirmation messages. Maybe in Views, too. 🙂
I've been frustrated by this as well and have always used two fields for first and last. Beyond that there are a couple of ways I can think of for you to handle your issue. You can either set up two hidden fields for the first and last and add jQuery to split the name into those fields and when the form is saved, you have the fields separate. You can create a custom shortcode to split a string into two pieces and, wherever you use [6], you change it to [my-shortcode name="[6]"]. The problem with both of these solutions is that if the person enters a middle name or initial or a suffix or prefix to their name, the splitting is not going to work.
Please login or Register to submit your answer