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

remove required field when clearing form

Community Beginner ,
Mar 13, 2018 Mar 13, 2018

Hi,

I have a form with checkboxes that when is checked shows a text field. This text field is required. When I put in to clear the form, the text field is hidden, but it remains required, which is wrong because it is not visible. How do I remove the required one when cleaning the form?

Javascript in checkbox:

getField("Copo").display = event.target.value === "Off" ? display.hidden : display.visible;

this.getField("Copo").required = (event.target.value!="Off");

Actions in clear button:

reset form an javascript:

getField("Copo").display = display.hidden;

TOPICS
PDF forms
1.9K
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
LEGEND ,
Mar 14, 2018 Mar 14, 2018
LATEST

Just set the "required" property to false.

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
LEGEND ,
Mar 14, 2018 Mar 14, 2018
LATEST

Just set the "required" property to false.

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