Youssra Saoudi
Youssra Saoudi

Reputation: 105

Hide text field in Adobe form and remove the space to move up the next text

I have 7 text fields in my Adobe form and if one of them is hidden, the next fields should move up.

Currently, the text field between "Retenue..." and "Jalons" is hidden correctly but the fields below did not move up.

When one field is hidden, how to move up its below fields?

enter image description here

Here is the javascript code for the text field, to hide it:

if (xfa.layout.page(this) != xfa.layout.pageCount()){
    this.presence ="hidden";
}

Upvotes: 3

Views: 9599

Answers (1)

Cold_Class
Cold_Class

Reputation: 3484

Your JS seems correct since the field disappears.
Therefore the problem is most likely that you haven't configured the parent form correctly.
Here's a working example: enter image description here

  1. Create a subform
  2. Set it to "Textflow" (I don't know the actual english word, I'm using it in German)
  3. Move the textfields directly into that subform

That should be all, now when you change one of the textfields' presence to "hidden" the others will move up.

Upvotes: 0

Related Questions