3 Replies Latest reply on Jul 28, 2011 10:27 AM by try67

    DD - Allow a max. number of characters only!

    srinivas1506 Level 1

      Hello

       

      I am keeping a drop-down field on my interactive form and am setting "Allow user input his/her own value in it".

       

      But, i want to restrict end-user to enter a specified number of characters, we hv the same ability to specify for text fields.

       

      Do we hv any such option of specifying MAXIMUM NUMBER OF CHARACTERS in the drop-down field?

       

      Thaknk yoo

        • 1. Re: DD - Allow a max. number of characters only!
          try67 MVP & Adobe Community Professional

          You're probably posting in the wrong forum, since you can't add new form fields in Reader. You should post in one of the Acrobat forums, in the future.

          To answer your question: yes, you can do it, using the Validate event.

          Let's say you want the user input to be no longer than 5 characters. Then you enter this code as the custom validation of your combo:

           

          if (event.value.length>5) {

          app.alert("Error! You can only enter up to 5 characters.");

          event.rc = false;

          } else event.rc = true;

          1 person found this helpful
          • 2. Re: DD - Allow a max. number of characters only!
            srinivas1506 Level 1

            Thank you.

            I don't for some reason its not working! I did like below (am beginner)

             

            1) I put my cusrsor on the COUNTRY drop-down field of form (LiveCycle designer), i selected the VALIDATE event on the script, and i copied & pasted (am very beginner) your code snippet in the script editor, actuvated/compiled.    

             

            2) As ebnd-user i opened the form, its not working!!

             

            Pls. let me know Wht am missing?

            • 3. Re: DD - Allow a max. number of characters only!
              try67 MVP & Adobe Community Professional

              Oh, this is a LiveCycle form? In that case, post your question at the LiveCycle Designer forum.