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

Show or Hide text box depending on number of Characters

metrubio77
Registered: Jul 4 2011
Posts: 5

I have a Text Field where user will enter a code which is 7 characters long
 
can be any 7 characters (numeric, alphabetic, special, etc...)
 
if user enters code in Text Field, then I want the Text Box with pre-typed characters to show
 
I know hos to show or hide text/objects, but how do I tell it if 7 characters or more
 
if (EnterCID.rawValue = "XXXXXXX")
PEFCode.presence = "Visible";
else
PEFCode.presence = "hidden";
 
Your help is greatly appreciated
 
Thank You

My Product Information:
LiveCycle Designer, Windows
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Hi,

try this in the change:Event of EnterCID:
  1. if (xfa.event.newText.length >= 7)
  2. {
  3. PEFCode.presence = "visible";
  4. }
  5. else
  6. {
  7. PEFCode.presence = "hidden";
  8. }

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

metrubio77
Registered: Jul 4 2011
Posts: 5
radzmar,

thank you for the reply

unfortunately the script did not work

any other ideas