Javascript in PDF - Custom Keystroke Script

New Here ,
May 05, 2022 May 05, 2022

Copy link to clipboard

Copied

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 !

TOPICS
Create PDFs , How to , JavaScript , PDF forms

Views

86

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Community Professional , May 05, 2022 May 05, 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();

Likes

Translate

Translate
Adobe Community Professional ,
May 05, 2022 May 05, 2022

Copy link to clipboard

Copied

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();

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 05, 2022 May 05, 2022

Copy link to clipboard

Copied

LATEST

Thank you so much !

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines