Skip to main content
Known Participant
May 5, 2022
Answered

Javascript in PDF - Custom Keystroke Script

  • May 5, 2022
  • 1 reply
  • 3335 views

Hello,

 

I have a text field in my form that I'm trying to see if there is a way to « force » a certain format. So basically, I want them to put their postal code in that format : H1H 1H1 (letter - number - letter - space - number - letter - number). I also want the letters to be in capital letter. Is that possible and if so , how ?

 

Thank you !

This topic has been closed for replies.
Correct answer Nesa Nurani

Go to field properties -> Format tab, select 'Special' then 'Arbitrary Mask' and input this:

A9A 9A9

To make it all capital letters as 'Validation' script use this:

event.value = event.value.toUpperCase();

1 reply

Nesa Nurani
Community Expert
Nesa NuraniCommunity ExpertCorrect answer
Community Expert
May 5, 2022

Go to field properties -> Format tab, select 'Special' then 'Arbitrary Mask' and input this:

A9A 9A9

To make it all capital letters as 'Validation' script use this:

event.value = event.value.toUpperCase();

Known Participant
May 5, 2022

Thank you so much !