Hi there.
I have a webform that I would like to automatically include preset user information from the user profile like real name, timezone, phone number, etc. How can I call these values and place them inside either a locked or invisible group of text boxes within the existing webform?

Comments

swanzai’s picture

bump.

swanzai’s picture

bump? this seems easy...

rjl’s picture

If by webform, you mean forms created using the webform module, and if by profile, you mean the fields provided by the profile module then...

This functionality is included with version 5.x-1.2 of the webform module.

To have a hidden field with a value from the user profile inserted, this assumes the user filling in form is logged in of course...

1. In the components section of your webform, add a "hidden" component.
2. In the component form,

  • A. Provide a name for the field
  • B. In the default value field type %profile[the-exact-name-of-your-profile-field]
    The name of your profile field can be found on the admin/user/profile page. Careful not to confuse "Name" with "Title" The name is likely to follow this format: "profile_some_name"
  • C. Choose parent (Root is probably best), weight, etc.

Pretty straight forward, but maybe you are attempting something else?

swanzai’s picture

nope, thats exactly it. thank you very much.