These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

requiring specific field length

johnmolina
Registered: Mar 27 2008
Posts: 76
Answered

I have a field that I have defined as requiring NNNNNN. When I display the data, I used field display properties and change it to NNN-NNN and works fine.

If not, it does send an error. However user can just continue anyhow and save or submit it with incorrect data.

Is there a way thru javascript (if not in LC) to ensure this field is NNN-NNN when saved or submitted?

Thank you.

My Product Information:
LiveCycle Designer, Windows
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
In the object tab > field you can define a character limit for input fields.

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

johnmolina
Registered: Mar 27 2008
Posts: 76
I had tried that. However, getting many warnings, saying the number i defined does not match one or more of the pictures in the edit, display patterns.

My edit is set as 6. When user enters the 6 (NNNNNN), i display it as (NNN-NNN) so i now have 7. I need to ensure they dont try to enter less or more than 6. I am still a bit new to this and dont work with it every day like I hoped I would be.
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Well, here is what I've done.

1. Set char limit of text field to 6
2. Set view pattern to text{OOO-OOO}
3. Set edit pattern to text{OOOOOO}

So the user can only type in 6 chars like "AB12CD" and after this the field shows "AB1-2CD".
There are no error massages in this case.

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs