Answers.Body: <p>I'd suggest adding a javascript formatter to a single, custom input text field. I haven't tried it, but <a href="https://github.com/firstopinion/formatter.js" rel="nofollow noreferrer">formatter.js</a> looks like it would deliver what you want.</p>
  
  <p>Their <a href="http://firstopinion.github.io/formatter.js/demos.html" rel="nofollow noreferrer">Credit Card demo</a> illustrates what you want - accepts pasting of data with and without hyphens, prevents pasting / input of values which don't match the validation rule. It just needs a different pattern for hyphen placement to deliver bank accounts.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-01T21:27:15.213Z
Answers.LastActivityDate: 2016-12-01T21:27:15.213Z
Answers.UserDisplayName: Chris Burgess
Body: <p>We need to store bank account numbers and will set up a CiviCRM custom field for the data. Ideally we would like the field to be such that people only enter data in the following format xx-xxxx-xxxxxxx-xxx. Is it possible to customise the custom field format? if so how would I do it?</p>
  
  <p>Or do I need to create a work around eg have 4 integer fields that display inline with dashes inbetween.</p>
  
Tags: <custom-fields>
Title: Is it possible to set up a custom field that requires a specific format eg xx-xxxx-xxxxxxx-xxx
ThreadText: # Is it possible to set up a custom field that requires a specific format eg xx-xxxx-xxxxxxx-xxx
  
  (Asked by: username_0 on 2016-12-01)
  
  We need to store bank account numbers and will set up a CiviCRM custom field for the data. Ideally we would like the field to be such that people only enter data in the following format xx-xxxx-xxxxxxx-xxx. Is it possible to customise the custom field format? if so how would I do it?
  
  Or do I need to create a work around eg have 4 integer fields that display inline with dashes inbetween.
  
  **Tags:** custom-fields
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-12-01. Score: 3
  
  I'd suggest adding a javascript formatter to a single, custom input text field. I haven't tried it, but [formatter.js](https://github.com/firstopinion/formatter.js) looks like it would deliver what you want.
  
  Their [Credit Card demo](http://firstopinion.github.io/formatter.js/demos.html) illustrates what you want - accepts pasting of data with and without hyphens, prevents pasting / input of values which don't match the validation rule. It just needs a different pattern for hyphen placement to deliver bank accounts.
  
  
  ---
  
  