GravityForms – SEPA Fields

Gravity Forms SEPA Fields — IBAN & BIC/SWIFT Fields with Real Validation

Collect clean, validated SEPA bank data in your Gravity Forms — a dedicated IBAN field with
check-digit validation and a BIC/SWIFT field with structure and ISO-country checks, plus a reusable
Settings API field type for developers. No Composer step required, the validation library ships
bundled.

Whether you’re building payout forms, SEPA direct-debit mandates, partner onboarding, or any form
that needs a bank account number, this add-on makes sure the IBAN and BIC you store are actually valid
— not just text that “looks like” a bank account.

Why you’ll love it

  • ✅ Real validation, not just a regex. IBAN check digits and per-country format
    are verified via the bundled, well-established globalcitizen/php-iban library; BIC/SWIFT
    is checked for length, canonical structure and a valid ISO 3166-1 country code.
  • ⌨️ Friendly block input for IBAN. The IBAN field is entered in clean 4-character
    blocks with auto-advance, backspace-back and paste-spreading — paste a full IBAN into any block
    and it fills them all.
  • Developer-friendly. Ships reusable iban and bic
    Gravity Forms Settings API field types, so any add-on can collect a validated
    IBAN or BIC in its own plugin or feed settings.
  • ⚡ Lightweight & dependency-bundled. The php-iban library ships under
    vendor/ with its Composer autoloader — no composer install needed, and a graceful
    regex fallback if it’s ever missing.
  • 116 countries supported, with normalized, upper-case storage and a readable
    4-block grouping in the entry detail and exports.
  • Translation-ready. English and German included, fully internationalized.

Key features

A dedicated IBAN form field

  • Drag-and-drop field in the form editor, grouped under e-Invoicing Fields.
  • Rendered as several 4-character input blocks instead of one long text field; the number of blocks
    follows the maximum IBAN length (up to 34 characters / 9 blocks) or a configured default
    country’s specific length.
  • Typing auto-advances to the next block, backspace jumps back, and pasting a full IBAN spreads it
    across all blocks automatically.
  • All blocks are combined into a single normalized value (upper-case, no spaces), so Gravity Forms
    stores one clean value per field.

A dedicated BIC / SWIFT form field

  • Single text input, validated for length (8 or 11 characters), canonical structure (4 letters
    bank code + 2 letters country + 2 alphanumeric location + optional 3 alphanumeric branch) and a
    valid ISO 3166-1 country code at positions 5–6.

Robust, layered validation (server-side)

  1. IBAN — check digits plus per-country format via the bundled php-iban
    library, with a graceful regex fallback if the library is unavailable.
  2. BIC / SWIFT — length, canonical structure and ISO-country code checks.
  3. Optional country restriction (configurable per field) — accept only IBANs or
    BICs of one specific country.

Robustness first: only a definitive invalid value ever blocks a submission.

Reusable Settings API fields (iban, bic)

Expose the same local validation inside any add-on’s plugin or feed settings —
modeled on the reference file_upload / list settings fields:

$fields[] = array(
    'name'  => 'company_iban',
    'type'  => 'iban',
    'label' => __( 'Company IBAN', 'your-textdomain' ),
    'class' => 'medium',
);

$fields[] = array(
    'name'  => 'company_bic',
    'type'  => 'bic',
    'label' => __( 'Company BIC / SWIFT', 'your-textdomain' ),
    'class' => 'medium',
);

Each renders a text input and validates with the same rule set as the corresponding form field.
Unlike the form fields, the Settings API fields apply no default-country restriction, since a settings
field is typically filled by an administrator with a fixed configuration value (e.g. the company’s own
payout IBAN or bank BIC).

Storage format

IBAN and BIC are stored upper-case and stripped of whitespace (e.g. DE89 3704 0044 0532 0130
00
→ DE89370400440532013000). In the entry detail and exports, the IBAN is shown
grouped in blocks of four for readability.

What’s included

  • The plugin (IBAN form field + BIC/SWIFT form field + reusable iban / bic
    Settings API field types).
  • The bundled globalcitizen/php-iban library with its Composer autoloader — no
    composer install needed.
  • English and German translations (.po / .mo).
  • Full documentation in English and German (README + feature overview).
  • Clean, well-structured, object-oriented code — easy to read, extend and audit.

Requirements & compatibility

  • WordPress with Gravity Forms ≥ 2.5
  • PHP ≥ 7.4
  • Works alongside the companion Gravity Forms VAT ID Field add-on — they share the
    same “e-Invoicing Fields” group without conflicts.

Support & updates

Clean, well-documented code that’s easy to maintain. Localization-ready out of the box. Built to
follow Gravity Forms’ official add-on framework and Settings API conventions, so it stays compatible as
your stack evolves.

Changelog

1.2.0

  • The IBAN and the BIC / SWIFT values are now also available as reusable Gravity Forms
    Settings API field types
    (iban and bic), with the same local format
    validation as the form fields.

1.1.0

  • Split off from “SP Gravity Forms SEPA Fields”: this plugin now provides only the IBAN and
    BIC / SWIFT fields. The VAT ID field lives in the separate “Gravity Forms VAT ID Field”
    plugin.

1.0.0

  • Initial implementation: IBAN field with per-block input, paste-spreading and php-iban
    validation; BIC / SWIFT field with length / ISO-country validation; optional default-country
    restriction per field; German translation.