Easyform documentation
Install easyformSchedule free trainingEasyapps home
  • Getting started
  • What's new
  • Easyform vs monday forms
  • Supported column types
  • ⚡Pro plan features
  • Pre-filling form fields with URL parameters
  • Mobile friendly forms
  • Rich text support
  • Fill forms inside monday
  • Links
    • Marketplace Listing
    • Book a call
  • Form settings
    • Adding, removing and reordering form fields
    • Item default values
    • Page style
    • Responsive field size
    • Right to left support
    • Form logo
    • Form title
    • Form description
    • Hiding field labels (compact mode)
    • Form colors
    • Submit button
    • Thank you page
    • Rounded corners
  • Adding New Fields
    • About adding new fields
    • Adding a text field
    • Adding a long text field
    • Adding a Connect Boards field
    • Adding a URL link field
    • Adding a phone field
    • Adding a numbers field
    • Adding a email field
    • Adding a date field
    • Adding a checkbox field
    • Adding a single choice field
    • Adding a multiple choice field
    • Adding a file upload field
    • Adding a people field
    • Adding a tags field
    • Adding a location field
  • Field specific settings
    • About field specific settings
    • Make a field required
    • Responsive field width
    • Editing a field's label / placeholder
    • Editing a field's description
    • Conditional display
    • Files Column Settings
    • Status column display modes
    • Dropdown column display modes
    • Connect Boards Column Support
    • People Column Support
    • Tags Column Support
    • Location Column Support
  • Shared field settings
    • About shared field settings
    • Responsive field size
    • Hiding field labels (compact mode)
    • Field colors
    • Field rounded corners
  • Publishing the form
    • Publishing the form
    • Publishing changes
    • Sharing the form
    • Embedding the form
  • Embedding Easyform
    • Embedding in Wix
    • Embedding in Shopify
    • Embedding in Softr.io
    • Embedding in Webflow
    • Embedding in WordPress
  • HOW-TOS
  • Adding a confirmation checkbox
  • Adding a Terms & Conditions field
  • Prepopulating embedded wordpress forms with user data
Powered by GitBook
On this page
  • Step 1: Create the Form
  • Step 2: Pre-fill the Form with URL Parameters
  • Step 3: Embed the Easyform in WordPress
  • Step 4: Add the Easyform to a Page

Prepopulating embedded wordpress forms with user data

PreviousAdding a Terms & Conditions field

Last updated 11 days ago

Using our , 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)

Next, create and style an Easyform with all four questions:

Step 2: Pre-fill the Form with URL Parameters

Step 3: Embed the Easyform in WordPress

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:

add_shortcode('FORM_NAME', function() {
    $current_user = wp_get_current_user();
    $user_email = $current_user->user_email;
    $user_name = $current_user->display_name;
    
    return '<script src="https://eazyform.app/js/set-embedded-eazyform-height.js"></script>
    <iframe class="eazyform-embed eazyform-dynamic-height" 
    src="EASYFORM_URL?embedded=1&autoheight=1&USER_EMAIL_COLUMN_ID=' . esc_attr($user_email) . '&USER_NAME_COLUMN_ID=' . esc_attr($user_name) . '" 
    frameborder="0" 
    onmousewheel="" 
    scrolling="no" 
    style="background-color: transparent; border-width: 0; margin: 0; padding: 0; width: 1px; min-width: 100%;"></iframe>';
});

Click Update File to save your changes:

Step 4: Add the Easyform to a Page

On the WordPress page where you want to embed the form:

  1. Add a Custom HTML block.

  2. Enter the FORM_NAME shortcode in square brackets (e.g., [eazyform_iframe]).

Then, when a logged-in user loads the page, their name and email will populate the form.

To pre-fill a form using URL parameters, you’ll need to Additionally, obtain the

To hide the pre-filled fields, enable the "" feature in your Easyform settings

get the column IDs for the pre-filled columns.
share URL of the Easyform.
Hide field when URL parameter is provided
URL Parameters feature
Click to view in full screen
Click to view in full screen
Click to view in full screen
Click to view in full screen
Click to view in full screen