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

Is there a way to lock a number box until radio button value activated

RustyWood
Registered: Mar 16 2010
Posts: 83

Thank you for all your information so far, very very helpful indeed. I'm completely new to Java Script so it is starting to sink in very slowly but this is a bit much, simple calculations is about as far as I have reached.

I'm using a exclusionary group (you can only check one, I beleive this means!) of radio buttons 1,2 ,3 for each participants 1 to 17 in a list.
After the third radio button value of £11.50 (which now works thanks to you guys as below) there is another box in which the participant may add an additional order of 1 or more @ a value of £3.00 each but only if they have checked radio button 3 @ £11.50. Is there a way of setting this box so no number may be added untill check box 3 has been checked. Then this total would be added to the total from the radio button total.

Also is there a way to add up each list of radio buttons for a total at the bottom from the 17 participants eg total of value 1 @ 5.25, total of value 2 @ 9.00, total of value 3 @ 11.50

var a = this.getField("partcipant_1_checkbox").value;
if(a == 1)
  event.value = 5.25; // 
else if (a == 2)
    event.value = 9.00; // 
else if (a == 3)
    event.value = 11.50; //

Thank you in advance

Rusty

My Product Information:
Acrobat Standard 9.3.1, Macintosh
jimhealy
Team
Registered: Jan 2 2006
Posts: 146
Quote:
Also is there a way to add up each list of radio buttons for a total at the bottom from the 17 participants eg total of value 1 @ 5.25, total of value 2 @ 9.00, total of value 3 @ 11.50
If the "Export Value" of the radio buttons are numbers that you want to add, you can just use a simple Sum calculation on them.

Quote:
After the third radio button value of £11.50 (which now works thanks to you guys as below) there is another box in which the participant may add an additional order of 1 or more @ a value of £3.00 each but only if they have checked radio button 3 @ £11.50. Is there a way of setting this box so no number may be added untill check box 3 has been checked. Then this total would be added to the total from the radio button total.
I assume that those are Text fields? You would want to start those off as Read Only, then add a Mouse Up action to the radio buttons in which you check for the value to be 11.50 and then set the corresponding text field to be read only or not based on that.

Jim Healy
FormRouter, Inc.
Check out our FREE Advanced Acroform Toolset:
http://www.formrouter.com/tools

Jim Healy, Founder & CEO FormRouter Inc.
Chapter Leader AUG RTP NC
http://www.formrouter.com

RustyWood
Registered: Mar 16 2010
Posts: 83
Hi Jim thanks I managed to set the radio buttons to allow the text box to be blocked by using show hide field in mouse up. The last radio button reveals the text box to add a quantity,the problem with that is I have other calculations coming off that box and say you type in a number and step back to button 2 the number remains but hidden??

I'm still having a problem adding this quantity as a value of 1* 3.00 = £3.00, 2* 3.00 = £6.00 etc to the radio button calculation you gave me, any ideas?

Quote:
If the "Export Value" of the radio buttons are numbers that you want to add, you can just use a simple Sum calculation on them.
From the radio buttons I also need to add up the list into three different totals eg radio button 1 total list = 10, button 2 total list = 3 etc but as the buttons are as a set I get the calculation from all the buttons into one box and not separated. Again any ideas?

Thanks loads for all your help

Rusty
jimhealy
Team
Registered: Jan 2 2006
Posts: 146
You need a custom calculation for each group. You need to look at the value of each group and sum it if it is equal to the value for the current calculation.

Jim Healy
FormRouter, Inc.
Check out our FREE Advanced Acroform Toolset:
http://www.formrouter.com/tools

Jim Healy, Founder & CEO FormRouter Inc.
Chapter Leader AUG RTP NC
http://www.formrouter.com