Skip to main content
JessiK
Participating Frequently
March 13, 2018
Answered

Checkboxes and text fields

  • March 13, 2018
  • 1 reply
  • 910 views

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?

This topic has been closed for replies.
Correct answer try67

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");

1 reply

try67
Community Expert
Community Expert
March 13, 2018

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?

JessiK
JessiKAuthor
Participating Frequently
March 13, 2018

The field can be visible all the time. I need it to become required if the corresponding checkbox is ticked

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
March 13, 2018

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");