Automatic realignment of text fields (possible with JavaScript)

New Here ,
Apr 22, 2021 Apr 22, 2021

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.

TOPICS
Create PDFs, How to, JavaScript

Views

44

Likes

Translate

Translate

Report

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
Most Valuable Participant ,
Apr 22, 2021 Apr 22, 2021

Copy link to clipboard

Copied

LATEST

You can move fields on the page by changing the value of their rect property.

Likes

Translate

Translate

Report

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