Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Checkboxes and text fields

Community Beginner ,
Mar 13, 2018 Mar 13, 2018

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?

TOPICS
PDF forms
804
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
Mar 13, 2018 Mar 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");

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 13, 2018 Mar 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 13, 2018 Mar 13, 2018

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 13, 2018 Mar 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");

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 13, 2018 Mar 13, 2018

Sorry, i forgot...

It worked! Wonderful

Thanks!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 31, 2023 May 31, 2023
LATEST

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? 

quote

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



Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines