I have the following code behind some Radio Buttons:
Form1645.Page3.TeeCrossSubform.TeeCross::exit - (JavaScript, client)
if Page3.TeeCrossSubform.TeeCross.rawValue = "N" {
xfa.Page3.TeeCrossSubform.Disruptfield.access = "open";
xfa.Page3.TeeCrossSubform.TeeCrossCC.access = "protected";
}
else {
xfa.Page3.TeeCrossSubform.Disruptfield.access = "protected";
xfa.Page3.TeeCrossSubform.TeeCrossCC.access = "open";
}
NOTE: I based this code on the following information (which may be wrong but I found nothing else on the subject): http://forms.stefcameron.com/2010/03/08/disabling-all-fields-within-subform/
No matter which radio button is selected (Y or N) the fields are all "open" or "unprotected".
Any help is greatly appreciated!
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
sorry my fault, the SOM expression still maybe wrong.
Try
Form1645.Page3.TeeCrossSubform.TeeCross::click - (JavaScript, client)
if (xfa.form.Form1645.Page3.TeeCrossSubform.TeeCross.rawValue == "1") {
xfa.form.Form1645.Page3.TeeCrossSubform.Disruptfield.access = "open"; | |
xfa.form.Form1645.Page3.TeeCrossSubform.TeeCrossCC.access = "protected"; |
} else {
xfa.form.Form1645.Page3.TeeCrossSubform.Disruptfield.access = "protected"; | |
xfa.form.Form1645.Page3.TeeCrossSubform.TeeCrossCC.access = "open"; |
}
Views
Replies
Total Likes
Hi,
I think you SOM expression is not correct.
xfa.Page3.TeeCrossSubform.... should be xfa..Form1645.Page3.TeeCrossSubform...
Views
Replies
Total Likes
I have update the code to be the following but it still doesn't work:
Form1645.Page3.TeeCrossSubform.TeeCross::exit - (JavaScript, client)
if xfa.Page3.TeeCrossSubform.TeeCross.rawValue = "N" {
xfa.Form1645.Page3.TeeCrossSubform.Disruptfield.access = "open";
xfa.Form1645.Page3.TeeCrossSubform.TeeCrossCC.access = "protected";
}
else {
xfa.Form1645.Page3.TeeCrossSubform.Disruptfield.access = "protected";
xfa.Form1645.Page3.TeeCrossSubform.TeeCrossCC.access = "open";
}
Any other ideas?
Views
Replies
Total Likes
Hi,
sorry my fault, the SOM expression still maybe wrong.
Try
Form1645.Page3.TeeCrossSubform.TeeCross::click - (JavaScript, client)
if (xfa.form.Form1645.Page3.TeeCrossSubform.TeeCross.rawValue == "1") {
xfa.form.Form1645.Page3.TeeCrossSubform.Disruptfield.access = "open"; | |
xfa.form.Form1645.Page3.TeeCrossSubform.TeeCrossCC.access = "protected"; |
} else {
xfa.form.Form1645.Page3.TeeCrossSubform.Disruptfield.access = "protected"; | |
xfa.form.Form1645.Page3.TeeCrossSubform.TeeCrossCC.access = "open"; |
}
Views
Replies
Total Likes
Thank you radzmar! Based on your code I determined the issue I did incorrectly is I didn't use the '==' in the if statement and I missed the () brackets at the beginning and end of the logic statement. It has been over 10 years since I took my Java course in school so I am forgetting the little things like this!
Views
Replies
Total Likes
Hi again radzmar!
What if i want to restrict user from using the arrow keys within radio button??
I have 3 options in on radio group where the 2nd and 3rd options are protected. Ofcourse tab order does not work there but when the focus is on the first option, i am still able to move to the next options (2nd and 3rd) with arrow keys and they get selected despite them being "protected".
This happens only when i use arrow key and now while using mouse!
Please help!
Thanks,
Radhika Magaji
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies