[support] First and Last names pre-filled in a Webform

Afan Pasalic drupal at afan.net
Wed May 7 14:25:44 UTC 2014


Hi to all!
In /admin/config/people/accounts/fields I created First and Last name fields (field_name_first and field_name_last).
Installed Real Name module and on /admin/config/people/realname page, for Realname pattern I selected [user:field_name_first] [user:field_name_last]
Now, on the profile page, instead username I can see First and Last name. Works great.

I created a Webform with first and last name fields (some kind of registration for an event). Label: “FirstName” (no quote, of course). Field Key: “first_name”. If I got it correct, I have to put field name into Default value field to pre-filled the fields with user data. I tried every possible combination and never got the first (or last) name into first (last) field. I tried %profile[field_name_first], %profile[user:field_name_first], [user:field_name_first], [field_name_first] - nothing works. If I put %username I’ll get username pre-filled in the form field. The same if I use %profile[name]. But can’t get First name.

What am I doing wrong?

Thanks.


More information about the support mailing list