Part of the Webform ecosystem · 225 projects
This module adds a SWIFT/BIC field type to Drupal's Webform module. It validates that the entered value conforms to the correct Business Identifier Code format.
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.
Ask your assistant about Webform SWIFT/BIC Field
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
More in the Webform ecosystem
Most installed first