Copy link to clipboard
Copied
Copy link to clipboard
Copied
Try this Script:
var oFld = this.getField("text1");
if (event.target.value !== "Off") {
oFld.value = oFld.defaultValue;
oFld.readonly = true;
} else {
oFld.readonly = false;
}
Copy link to clipboard
Copied
Try this script in a mouse up action in the checkboxes.
You must adjust the text field name for each row.
var oFld = this.getField("text1");
if (event.target.value != "Off") {
oFld.value = oFld.defaultValue;
oFld.readonly = true;
}
else {oFld.readonly = false;)
Copy link to clipboard
Copied
Thank you very much, I'll try it. The next row would have text2 right?
Copy link to clipboard
Copied
I don't know how your fields are named.
In the script you must indicate the name of the corresponding text field for each checkbox of each row.
Copy link to clipboard
Copied
Yeah, i just have time to try it...been busy but it didn't work when i tried it, it worked for only the first text box but it keeps giving me syntax error when i try to format the other text boxes. I got stuck at that point. Please do you have any idea what i should do?
Copy link to clipboard
Copied
Can you share (part of) this form?
Copy link to clipboard
Copied
Sure. That's the error message that keeps showing up
Copy link to clipboard
Copied
Try this Script:
var oFld = this.getField("text1");
if (event.target.value !== "Off") {
oFld.value = oFld.defaultValue;
oFld.readonly = true;
} else {
oFld.readonly = false;
}
Copy link to clipboard
Copied
Okay I'll try it
Copy link to clipboard
Copied
It worked!!!!!!!!! Thank you so much!!!
Copy link to clipboard
Copied
Great - Please mark my answer as correct.
Copy link to clipboard
Copied
of course! I'll do that immediately. Thank you once again
Copy link to clipboard
Copied
Sorry, I didn't see the parenthesis at the end of my script:
var oFld = this.getField("text1");
if (event.target.value != "Off") {
oFld.value = oFld.defaultValue;
oFld.readonly = true;
}
else {oFld.readonly = false;}
😉
Copy link to clipboard
Copied
Thank you very much, your contribution was very helpful🙏🏾