How to create 'preferred choice' or 'ranking' in form

New Here ,
Mar 23, 2020 Mar 23, 2020

Copy link to clipboard

Copied

Have created a form but stuck on one part where there are a number of choices to a question and the user needs to be able to show their preferred choice. There will be 8 choices in total and the user will need to select their first and second choice, a simple 1 and 2 will suffice, but I don't want users to be able to repeat values. Previously a ranking wasn't required and the form used checkboxes, but it now needs to be more specific, is there a script that can be applied here?

TOPICS
Acrobat SDK and JavaScript, How to, PDF forms

Views

76

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Most Valuable Participant ,
Mar 23, 2020 Mar 23, 2020

Copy link to clipboard

Copied

What kind of fields are you using?

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 23, 2020 Mar 23, 2020

Copy link to clipboard

Copied

Previous version used checkboxes, I assumed this time it could be a text field where the user would enter 1 or 2 rather than say a drop down menu, it's just ensuring that the user can only choose two options. Thanks

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Most Valuable Participant ,
Mar 23, 2020 Mar 23, 2020

Copy link to clipboard

Copied

And what are the names of the fields in each group? If the options are only 1 or 2 I would recommend using drop-downs.

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Mar 23, 2020 Mar 23, 2020

Copy link to clipboard

Copied

You could use a list box, where each choice is an entry and arrow buttons are used to move the entries up and down to show ranking order. This is also a nice visual clue for everyone, since the items are listed in order. 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines