Document – User Registration for Elementor Forms

User Registration for Elementor Forms extends Elementor Pro Forms with the ability to register new WordPress users.

Easily map form fields to WordPress user profile data (username, email, first name, last name, etc.), automatically assign roles to new users, and validate input to prevent duplicates or invalid data.

Installation

  1. Download the plugin or install it directly from Plugins → Add New.
  2. Upload and activate the plugin.
  3. Make sure Elementor Pro is installed (required).
  4. Create a Form using Elementor Pro.

Usage

1. Create a Registration Form

  • Add a form using Elementor Pro Forms.
  • Include required fields: Username, Email, Password, First Name, Last Name…
  • In Form Settings → Actions After Submit, select User Registration.

2. Map Fields

In the User Registration Settings tab, map form fields:

  • Username Field → [field id=”username”]
  • Email Field → [field id=”email”]
  • Password Field → [field id=”password”]
  • First Name Field → [field id=”first_name”]
  • Last Name Field → [field id=”last_name”]

3. Role Assignment

  • Select the role to assign to new users, e.g., subscriber, customer, or any custom role.

4. Validation

The plugin validates user input:

  • Valid email format.
  • Prevents duplicate emails.
  • Prevents duplicate usernames.
add_filter( 'elementor_pro/forms/validation/email', function( $field, $record, $ajax_handler ) {
    $email = sanitize_email( $field['value'] );
    if ( ! str_ends_with( $email, '@mycompany.com' ) ) {
        $ajax_handler->add_error( $field['id'], __( 'Only company emails are allowed.', 'user-registration-for-elementor-forms' ) );
    }
}, 10, 3 );