Webform SWIFT/BIC Field adds a SWIFT/BIC element to Webform, for forms that ask for the bank identifier of an account: supplier details, refunds, payouts, direct debits. A value that is not a SWIFT/BIC code is refused before the submission is saved, and a code typed in lowercase or in groups is stored in capitals without spaces.
Features
- 🏦 SWIFT/BIC validation. The value must have 8 or 11 letters and digits, with a country code in fifth and sixth place, checked with the Bic constraint of the Symfony Validator component.
- 🔤 Typed the way banks print it. Whitespace is removed and letters are made uppercase before validation, so
coba de ff xxxis accepted and stored asCOBADEFFXXX. - ⚙️ The settings of a text field. Required, placeholder, description, conditions, and several codes in one element through Allowed number of values.
- 📱 On-screen keyboards. The input asks phones for capital letters and turns spell checking off.
- 🔌 A form element for site code.
'#type' => 'webform_bic_field'works in any Drupal form, with the same validation.

Quick start
composer require drupal/webform_bic_field drush en webform_bic_field
- Go to Structure > Webforms, edit a webform and click Add element.
- Pick Webform SWIFT/BIC field under Advanced elements.
- Give it a title, tick Required if the form needs it, and save.
- The form now refuses anything that is not a SWIFT/BIC code, and its submissions hold the code in capitals with no spaces.

Typed as "coba de ff xxx", previewed and stored as COBADEFFXXX.
Good to know
- The code is checked for its form, not looked up: whether the bank exists needs a directory of financial institutions, which the module does not ship.
- Install the module with Composer. It needs the Symfony Intl component to check the country code, and Composer installs it.
- The module installs an example webform at
/webform/webform_bic_field, which only administrators can submit. Delete it if you do not need it.
Additional requirements
- Drupal 10.3 or later, or Drupal 11.
- Webform 6.2 or later.
- The Symfony Intl component, 6.4 or 7, installed by Composer.
Recommended modules/libraries
- Webform IBAN field: an IBAN element for Webform, for the account number next to the SWIFT/BIC code.
Community documentation
- README: installation, what is validated, and the example webform.
Supporting this module
Developed and maintained by Bloomidea. Bloomidea offers support and custom development for this module.
Supporting organizations:
Development and maintenance
Project information
- Project categories: Developer tools, E-commerce, Site structure
- Ecosystem: Webform
12 sites report using this module
- Created by introfini on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.



