Pre-populating an email address

Submitted by GEORGE on

So now that we know how to force users to log in to fill out the webform... this means we know the user's email address. And we probably have a field asking the user for their email address. Maybe we can save them a step.

Editing the form, click the "Edit" button next to the email address field. In the panel that appears, click the Advanced tab. The first section is for a "Default value."

Field, Advanced, Default value

Enter [current-user:mail]

Do not click the "Set default value" button. It's a bit confusing. Just scroll to the bottom of the panel and click Save.

Now, your form should pre-populate the email address with the user's email address. And since they've logged in using an RPI account, that will be an RPI email address. They have the option to change that, but why would they?

Back to top