Automatic realignment of text fields (possible with JavaScript)
Copy link to clipboard
Copied
Hello community,
I have different textfields and to keep the document clear I decided to install checkboxes on the first pages. If the user selects a checkbox, the related textfields disappears. I implemented that with the following Javascript:
if (this.getField("checkbox1").value=="Off")
this.getField("Textfield1").display=display.visible;
else
this.getField("Textfield1").display=display.hidden;
The goal is that the other text fields are moving upwards as soon as a text field disappeared. Is that possible? Is it maybe possible that elements align automatically? Or is it possible to implement that with another JavaScript?
Thanks in advance.
Copy link to clipboard
Copied
You can move fields on the page by changing the value of their rect property.

