Copy link to clipboard
Copied
Hi,
I have a form with multiples checkboxes. I want a text to be written when the checkbox is triggered.
Like this:
Object Quantity
( ) Object 1 _________________
( ) Object 2 _________________
( ) Object 3 _________________
( ) Object 4 _________________
If Object 1 is triggered, I need to Know the quantity, and this is required.
How can i do?
Copy link to clipboard
Copied
OK. You didn't answer my other question, though... Let's say it's called "Qty1".
Use this code as the Mouse Up event of the check-box:
this.getField("Qty1").required = (event.target.value!="Off");
Copy link to clipboard
Copied
Do you mean that when the box is ticked you want to enable the field and make it required, and when it's not the field should be disabled (and not required)? What are the names of these fields?
Copy link to clipboard
Copied
The field can be visible all the time. I need it to become required if the corresponding checkbox is ticked
Copy link to clipboard
Copied
OK. You didn't answer my other question, though... Let's say it's called "Qty1".
Use this code as the Mouse Up event of the check-box:
this.getField("Qty1").required = (event.target.value!="Off");
Copy link to clipboard
Copied
Sorry, i forgot...
It worked! Wonderful
Thanks!
Copy link to clipboard
Copied
Hey, not OP, but I would like some help regarding the exact thing you mentioned. a Checkbox, once selected should enable a row of entries (entry 1, entry 2, entry 3 etc) while other entry fields in other rows are deactivated. Also, how do i make a box deactivated by default?
Do you mean that when the box is ticked you want to enable the field
and make it required, and when it's not the field should be disabled (and not required)? What are the names of these fields?
By @try67