Since both check boxes and radio buttons have a value of "Off" when not selected, any incomplete group of buttons or an individual check box will have a value of "Off".
You want to set all the check boxes except box 1 to read only. Then for the mouse up event for check box one you want the following script to run:
if(event.target.value != "Off") this.getFeild("checkbox 2").readonly = false;
this.getFeild("checkbox 2").readonly = false;
this.getField("checkbox 2") = "Off";
And so on down the line.
With some prior planning the script could be reduced to a function and
I do understand that the value is "Off" on the checkboxes. What I want to prevent is a user deciding to say, skip step 5 and go straight to step 15 in the process. So I would like to lock down all check boxes until the previous one has been checked, or is marked as "On".
If all boxes except box 1 is set to read only, how can someone skip to box 15 and check it since it is read only.
As one checks a check box only the next check box is made read write or unlocked. So unless check box 14 has been checked, box 15 will remain read only and cannot be selected.
Unless one needs to check for a very specific item from an exclusionary group of check boxes or radio buttons the most reliable test is to check for the "Off" value or the value not being "Off".
My advice would be to not put any script in the checkboxes at all. Create a hidden, calculated, field that manages the readonly property of the checkboxes. You also might consider creating the checkboxes as an array (check.0, check.1, check.2) - that'll make it easier to loop through them all.
One thing you'll have to decide is what to do if the user checks some check boxes in the correct sequence but then decides to uncheck one (or more) of them. What should happen then?
Thank you everyone for the help.
I eventually managed to find a piece of code that would show the next hidden check box but also hide the checkbox if the one before is unchecked. Below is the code I used just in case anyone is interested.
var nHide = event.target.isBoxChecked (0) ?display.visable:display.hidden;
this.getField("Check Box2").display = nHide;
Again thanks for the help.