How do you force a post code response in a text box | XM Community
Skip to main content

Hi. I'm asking a respondent to fill in their post code in a textbox in my survey. How can I force that the format they input the post code follows the correct UK post code format? For instance, in the UK the post code is EC1X 1AB (6 to seven alphanumeric characters)> Is there a way that the text box forces that the format is only like that?
Another question - is there a way for this to autopopulate - so when someone types EC1X - it will already show all the options - including the correct one which is EC1X 1AB - for instance

Autopopulation is definitely possible. You can look at libraries like select2 or autocomplete.


Thanks. Where is that in the toolbar?


That's going to require some custom coding. Search the community for examples of select2, you'll get some.


If you don't want to auto populate, you can use Custom Validation and regex. Refer to this for regex pattern.


Leave a Reply