Copy link to clipboard
Copied
I have form fields named DAY. And I have other form fields named JUSTIFICATION. But I need the fields JUSTIFICATION to appear only when something is written on the fields DAY, so that when nothing is written on the fields DAY, the fields JUSTIFICATION do not apper and do not be printed. I'd be really really thankful if someone could help me ith this.
You can accomplish this with JavaScript.
You may use, for example, a custom calculation script in the DAY field object like this:
if (event.value =="") {
this.getField("JUSTIFICATION").display = display.hidden;
} else {
this.getField("JUSTIFICATION").display = display.visible;
}
I am typing from my mobile device, so I haven't tested the example script above.
See if it works for you.
Copy link to clipboard
Copied
You can accomplish this with JavaScript.
You may use, for example, a custom calculation script in the DAY field object like this:
if (event.value =="") {
this.getField("JUSTIFICATION").display = display.hidden;
} else {
this.getField("JUSTIFICATION").display = display.visible;
}
I am typing from my mobile device, so I haven't tested the example script above.
See if it works for you.
Copy link to clipboard
Copied
It worked perfectly, @ls_rbls, I'm so impressed... I know too little about JavaScript, and your help encouraged me to study it. Really grateful. You're amazing!
Copy link to clipboard
Copied
You're welcome.
Copy link to clipboard
Copied
For more information on hiding and showing form fields, see this article:
https://www.pdfscripting.com/public/Hiding-and-Showing-Form-Fields.cfm