Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Hide only the caption when field content is empty for a Adobe Print Form field

Anonymous
Not applicable

Dear all,

We try to hide only the caption of a field if the field content is empty.

a) The following code will hide the entire raw (entire field including caption). What should we change to the code to only hide the caption?

-------------------------------------------------------

if(this.rawValue == null)

{

  this.presence ="hidden"

}

-------------------------------------------------------

b) Another option would be to use conditional formatting -> change caption text to white colored text,  if the field content is empty to make it invisible on the printout.

Is there any options in ALD available or which code should be used to realize one of the above options?

Thank you in advance!

Kind regards,

Roy

1 Accepted Solution
Correct answer by
Anonymous
Not applicable

change the script to:

if(this.rawValue == null)

{

     xfa.resolveNode("this.caption.value.#text").value = "";

}

View solution in original post

1 Reply
Correct answer by
Anonymous
Not applicable

change the script to:

if(this.rawValue == null)

{

     xfa.resolveNode("this.caption.value.#text").value = "";

}

View solution in original post