Answered
Thank you Jim I found this calculation of yours and it came in very helpful but;
I have three radio buttons in a group 1 2 + 3 if you sellect 3 allows you to add into text box "participant_1_quantity_additional_packs" a value
getField("participant_1_quantity_additional_packs").hidden = (Number(getField("partcipant_1_check_box").value) < 3);
I'm trying to return "participant_1_quantity_additional_packs" back to zero if 1 or 2 are then checked such as if the client had made a mistake, the number in "participant_1_quantity_additional_packs" the number remains but hidden, so messing up my other calculations
getField("participant_1_quantity_additional_packs").hidden = (Number(getField("partcipant_1_check_box").value) < 3);// else if(Number(getField("partcipant_1_check_box").value) < 2) ("participant_1_quantity_additional_packs") = "0";
Obviously I know this is incorrect but this is the sort of calculation I'm trying to get if it makes any sense at all??
Of course i'm getting a syntax error 2: at line 3 as well !!!
I have tried a few things but as you know my Javascript is very limited
With thanks
Rusty
You continue to write very incomplete code or do not order the statements of code in the correct sequence. Please look at the tutorials, articles, eSiminars on demand at this site please to learn how to create simple JavaScript statements.
If you are going to hide a field because a logical condition has been met, then you should have some code that will display that field if the condition is not met. You can set the field to be displayed before testing for the value that will hide field or you provide and 'else' block of code to display the code. So when the entire script has run, the field is either displayed or it is not displayed. It is not entirely clear what you are trying to do. I would guess you want a field's value set to zero and hidden when another field has a value less than 2.
[url=http://www.acrobatusers.com/tutorials/2006/show_hide_fields]Hiding and Showing Form Fields[/url] by Thom Parker
George Kaiser