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

Can Radio Buttons (y/n) drive User Input requirements?

Yokie Kuma
Registered: Dec 9 2010
Posts: 4
Answered

My current form is being used to inspect manufactured goods in a factory.
An Inspector uses the form to track items to check.
So, when they are told to look at cracks, there is a Yes/No check box (radio button) they would select. If they select yes, I also want a qty found entered. If they check no, the qty field should be locked .....
Can I use the value from the Y/N radio button to change the input parameter of a number field?
 
No in the radio button would make the qty field "read only"
Yes in the radio button would make the qty field "user input required"
 
Thanks,
Yokie

My Product Information:
LiveCycle Designer, Windows
Niall
Expert
Registered: Apr 26 2006
Posts: 62
Accepted Answer
Hi,

Yes this is possible, but will involve some script.

I would recommend that you place the script in the click event of the radio button exclusion group and not in the individual radio buttons.

First select the radio button group and go to the Object > Binding palette. Check what the specified values are for the Yes (I will assume 1) and for the No (I will assume 2).Then the following should work in the click event:

if (this.rawValue == 1)
{
quantity.access = "open";
quantity.mandatory = "error";
}
else
{
quantity.mandatory = "disabled";
quantity.access = "readOnly";
}

You could also hide the quantity field.

The last thing to consider is what is the default state for the quantity object (open & required OR readOnly & optional). You can set this at design time in LC Designer.

Hope this helps,

Niall
Assure Dynamics

Yokie Kuma
Registered: Dec 9 2010
Posts: 4
Thank you Niall,

This worked well.

I had to modify your script a bit ....
added the "then" after the "if" and had to remove the "{" ....

but it works marvelously now!

Cheers!

Yokie