cancel
Showing results for 
Search instead for 
Did you mean: 

input value restriction

0 Kudos

Hello

I want to make a form that would be used as a survey, in which some products will appear in a table and the users have to rank some of their qualities with grades from 1 to 6, and some fields can be empty.

What is the best way to limit the input to be only 1-6?

I thought of some ways: using scripts (FC or JS), using patterns, or using dropdown.

I didn't manage to do it using templates.

I tried using dropdowns, but it wasn't so good; the users have to be able to use the keyboard for input, and with dropdown they have to click the arrow in order to use the keyboard, and when 'Allow custom text emtry' is checked, they can enter whatever they want.

I guess it can be done using scripts, but I'm not sure that's the best way to do it.

What do you think?

With regadrs,

Arik

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member365727
Active Contributor
0 Kudos

Hi,

Writing java script is the best way to achieve this functionality. You can use validation script event.

Regards

Srikanth KV.

0 Kudos

Thank you.

Do you know if there's any guide about scripting in forms?

A guide that describes the different events, maybe with some code examples..

I saw the 'FormCalc User Reference', but it's not so helpful for beginners.

Edit:

I just saw a PDF form that has a dropdown in which user input is enabled without clicking the arrow:

http://www.planetpdf.com/planetpdf/pdfs/ppjslc_commonex_4.pdf

when the cursor is on the dropdown, you can type a letter and it would select the appropriate option.

When I do it on the PDF I created, it doesn't work! it only works if all the options are displayed.

How can I make it work?

Regards,

Arik.

Edited by: Arik Abulafia on Apr 26, 2008 7:33 PM

former_member365727
Active Contributor
0 Kudos

Hi,

To know the list of events with examples, refer to the help documentation in AdobeLive Cycle designer.

Custom text entry in the drop down is possible, go to 'Object palette' of the drop down and enable the check box 'Allow custom text entry'. Drop down works as input field by enabling this check box.

Regards

Srikanth KV.