Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Help with formatting fields in PDF...

Avatar

Level 1

Hi -

I´m working on a form that should be filled in from the internet...

The design I did i InDesign - and the formfields I did i Acrobat Pro -
and finally I´m finetuning everything in LiveCycle...

I've runned into two problems...

I need the date field to correct itself - 
if the user choice to use the wrong format...

for example -

we want to have YYYY-MM-DD

and if the user writes DD MM YY -
it should be accepted and corrected....

is this possible - maybe with JAVA-script?

Also - In Sweden anyway we always write the Social Security number in this way
YYMMDD-NNNN ( N = Numbers between 0-9 )

How can I get the field to recognize and to crave - "demand" this format...

I´ll hope my Swinglish can be understandable?

IdéSpiran

1 Reply

Avatar

Former Community Member

I suggest that you make use of the Validation patterns for this. On the Object palette there is a Value tab and on that tab is a button for Validation Pattern. You can create a pattern in 4 areas - Display - what the user sees on teh screen, Edit - what the user enters in the field, Validation - what the value entered will be validated against and Data - what is stored in the data file. You will be interested in the Display pattern. Depending on the type of field you will see different data patterns ( i.e. Date fields show date patterns and TextFields have phone numbers, zip codes etc..). You can also create a custom pattern. Have a look in the docs about patterns and you will see what each of the chars represents and how to create one. For your SSN you will probably need javascript because of the combination of Date and number formats.

Hope that helps

Paul