Prepopulating embedded wordpress forms with user data
Using our URL Parameters feature, you can dynamically add logged-in user information, such as name and email to an embedded form on your WordPress website. Coupled with the ability to hide fields when a URL parameter is provided, you can create clean and minimalist forms while still collecting all necessary information.
Step 1: Create the Form
Start by creating the form. Use a board with the following four columns:
Item (Item name column)
Description (Long text column)
Email (Email column)
User Name (Text column)
Click to view in full screen
Next, create and style an Easyform with all four questions:
In the WordPress editor, navigate to:
Appearance → Theme File Editor → Theme Functions.
Add the following embed code at the bottom of the file. Be sure to replace the placeholder variables—FORM_NAME, EASYFORM_URL, USER_NAME_COLUMN_ID, and USER_EMAIL_COLUMN_ID—with their appropriate values:
Click Update File to save your changes:
Click to view in full screen
Step 4: Add the Easyform to a Page
On the WordPress page where you want to embed the form:
Add a Custom HTML block.
Enter the FORM_NAME shortcode in square brackets (e.g., [eazyform_iframe]).
Click to view in full screen
Then, when a logged-in user loads the page, their name and email will populate the form.