Gravity Forms IBAN validation

This add-on for Gravity Forms adds the option to validate if the users’ input is a valid IBAN bank account number.
The check is done when the user submits the form and it will show an error if the input is not correct. Only if this error is resolved the form can be actually be submitted.

In case of an invalid IBAN account number, the default Gravity Forms error message will be displayed in the language that Gravity Forms is set up in.

By installing this plugin besides Gravity Forms (premium plugin) you will be able validate IBAN account numbers through two ways:

  1. Apply a IBAN mask to existing fields
    You can apply a IBAN mask to regular text input fields that are already set up in your form. The mask will show as a placeholder inside the input element (eg. [____ ____ ____ __]). It validates the account number when submitting the form.
  2. Add a new IBAN input field to your form
    You can add a new field to your form. It validates the account number when submitting the form.

Demo

  • Standard field

  • Advanced field

Installation

  1. First install Gravity Forms.
  2. In the WordPress admin panel, go to [Plugins] in the left navigation menu.
  3. Click the [Add New] button and upload the plugin (.zip file)
  4. Activate the plugin
  5. Create a Gravity Form
    • Add or edit a standard field [Single Line Text]
      • Check the “Input Mask” option
      • Select IBAN from the dropdown menu
    • Or; Add an advanced field [IBAN]

IBAN mask length

(optional) You can set the max length of the IBAN mask in the Single Line Text field.
Default this is set to 32 since that is the length of IBAN numbers for Saint Lucia and Nicaragua. To override this default you can set it to 18 (NL) or 22 (DE) for example.

Beware! If you set this to 18 and someone needs to fill in an IBAN of 22, that will not work and that might throw your visitor/client off.

Open wp-config.php and replace the following comment:

/* That’s all, stop editing! Happy blogging. */

…with the following piece of code:

define('GF_IBAN_LENGTH', '22');
/* That's all, stop editing! Happy blogging. */

Screenshots

Gravity Forms IBAN validation: No mask
Gravity Forms IBAN Validation: Text input mask 2
Gravity Forms IBAN Validation: Text input mask

You just might want to validate a IBAN account in a Gravity Form, or help the visitor ensure he filled in his IBAN number correctly. Let us help you do so!

Changelog

Version 1.0.3

Release Date: may 15th, 2020

  1. Added: Option to manually overwrite the mask length, see install instructions above.
  2. Added: Option to set the field width (small/medium/large) in form editor
  3. Fixed: Show field preview for the advanced field in form editor
  4. Fixed: Default mask length set to 32 characters, was previously set to 36

Version 1.0.2

Release Date: may 13th, 2020

  1. Update: PHP IBAN library
  2. Fix:

    Warning: gmp_init(): Unable to convert variable to GMP – string is not an integer

Version 1.0.1

Initial release