How do I restrict the number of times an answer is selected from a drop down?

New Here ,
Dec 06, 2017

Copy link to clipboard

Copied

I know next to nothing about coding. Here's my scenario: I have a set of 29 options with drop down selections of Level 1, 2, 3, or 4. I want to input selection rules so that out of the 29, someone can only select the "Level 1" option a maximum of 7 times. Is this possible?

This is an example of 1 of 29 options on my form:

Here is the legend:

Level 1: 1-7 drug classes means that you can only select a MAXIMUM of 7 drug classes as Level 1

TOPICS
Acrobat SDK and JavaScript, Windows

Views

121

Likes

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

How do I restrict the number of times an answer is selected from a drop down?

New Here ,
Dec 06, 2017

Copy link to clipboard

Copied

I know next to nothing about coding. Here's my scenario: I have a set of 29 options with drop down selections of Level 1, 2, 3, or 4. I want to input selection rules so that out of the 29, someone can only select the "Level 1" option a maximum of 7 times. Is this possible?

This is an example of 1 of 29 options on my form:

Here is the legend:

Level 1: 1-7 drug classes means that you can only select a MAXIMUM of 7 drug classes as Level 1

TOPICS
Acrobat SDK and JavaScript, Windows

Views

122

Likes

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
Dec 06, 2017 0
Adobe Community Professional ,
Dec 06, 2017

Copy link to clipboard

Copied

Yes you can, but this is complicated.  Are you going to learn JavaScript and write this yourself?

Likes

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
Reply
Loading...
Dec 06, 2017 0
New Here ,
Dec 11, 2017

Copy link to clipboard

Copied

I was hoping not to. I don't really have the time to do it. In the future, yes. Right now, no.

Likes

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
Reply
Loading...
Dec 11, 2017 0
Adobe Community Professional ,
Dec 06, 2017

Copy link to clipboard

Copied

Can you explain what you are trying to achieve in the end? It might be easier to just let the user select the number of drug classes they require and then assign the correct level 1-4 as they go.

Likes

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
Reply
Loading...
Dec 06, 2017 0
New Here ,
Dec 11, 2017

Copy link to clipboard

Copied

Well, it's not that there are right and wrong answers. For example, they can select up to 7 drugs that they would like to test for at level 1. No more than 7. They can then select 8-14 drugs for level 2, no more no less. 15-21 drugs at level 3. and 22 and up for level 4.

Likes

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
Reply
Loading...
Dec 11, 2017 0
Adobe Community Professional ,
Dec 11, 2017

Copy link to clipboard

Copied

There are a couple of options for a solution. You could have a validation script that tests the current number of selections and then accepts or rejects the current selection based on the outcome. Another solution is to remove list options if they are already selected too many times.

However, this is a JavaScript forum. It is intended to help you learn how to create your own solution. It is not a 'get your project done for free' forum. If you just want this done you need to hire someone.

Likes

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
Reply
Loading...
Dec 11, 2017 0
New Here ,
Dec 11, 2017

Copy link to clipboard

Copied

Absolutely. Completely understand. Was really looking to learn about the possible capabilities. We have a developer that works with our company full time. If I want him to do something quickly, I have to explain as much as I possibly can to him. As I don't know much of anything about coding, it's sometimes difficult to zero him in on what I need done.

That being said, what I think would work best for us is the selection option being removed after too many have been selected. Can you speak more to that solution so I can lead him in the right direction? Maybe more in the direction of where he would need to insert the script to run? Sorry, just want to be able to give him as much information as I can. Not sure how much experience he has with adding custom script to Adobe.

Likes

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
Reply
Loading...
Dec 11, 2017 0
Adobe Community Professional ,
Dec 11, 2017

Copy link to clipboard

Copied

You have a developer and you want us to give your guy free advice. Hire me and I'll set you and your guy up with exactly what you need.

Likes

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
Reply
Loading...
Dec 11, 2017 0
New Here ,
Dec 11, 2017

Copy link to clipboard

Copied

This is a community forum. I'm asking for implementation help. I can have the code written for me. I'm asking where to put that code after it's done. If you don't want to offer the help, don't respond. If you're looking for a job, I hear monster.com is a great resource.

Likes

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
Reply
Loading...
Dec 11, 2017 0
Adobe Community Professional ,
Dec 11, 2017

Copy link to clipboard

Copied

Here are some articles that provide info on List Programming.

https://acrobatusers.com/tutorials/change_another_field

https://www.pdfscripting.com/public/List-Field-Usage-and-Handling.cfm

https://acrobatusers.com/tutorials/list_and_combo_in_lc

Likes

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
Reply
Loading...
Dec 11, 2017 1