Modules / Forms

Form: confirm email field

Mark an email field in the Form element as the confirmation of another field. The form compares the two as the visitor types and again when it is submitted.

  • On by default
  • Needs Bricks 2.4 or newer
  • Tested with Bricks 2.4.3
Recording: someone points a second email field at the first; on the live page, a typo in the repeated address brings up “Email addresses do not match”.Recorded in Bricks 2.4.3

The idea

This is the same idea the module "Shop: confirm email & password on registration" answers, so its votes are counted once. That module covers the shop's registration form. This one covers the Form element. Confirm password is part of Bricks 2.4, so Kiln adds only the email field.

How to use it

  1. In the Form element, add two Email fields. The first is the address, the second repeats it.
  2. Note the ID of the first field.
  3. Open the second field and enter that ID in Email field to confirm (Kiln).
  4. Optional: write your own text in Email mismatch error message. The default is "Email addresses do not match".

Leave Email field to confirm (Kiln) empty and the field stays a normal email field.

Where it appears in Bricks

Form element, Content tab, inside each field of the Fields list, after Bricks' confirm-password error message. The controls show when the field type is Email. Email mismatch error message shows once you enter an ID.

How it works with Bricks' confirm password

Kiln reuses the script Bricks uses for its confirm-password option. The visitor sees the error message while typing. When the form is submitted, the server compares the two values again and adds the same message if they differ.

Limits

  • The match is exact, including letter case. Spaces around the address are removed first.
  • The ID must belong to a field in the same Form element. With an unknown ID, no check runs.
  • If both fields are empty, there is no mismatch. Use the Required option on the fields to force an answer.

Settings

None. Turn the module on in Bricks > Kiln (it is on by default).

Requirements

Bricks 2.4 or newer.