Highlighted

JavaScript to reset fields on specific page within document

Explorer ,
Oct 10, 2020

Copy link to clipboard

Copied

Hi,

 

Am wondering if there is a script that would allow for a single page of field entries a user has made, to be cleared in entirety, likely using the function;

 

this.resetForm() 

 

Ideally looking to achieve this with script that doesn't require naming each field individually (lots of fields!) like the example shown below, but perhaps just allows the reset of the page itself?.

 

this.resetForm(["Field1", "Field2", "Field5"]);

 

The standard reset form function in DC Pro is somewhat annoying in as much as if you then add more fields later on after setting which specific fields you have ticked earlier on in making the form, it seems to add those new fields as well, which is frustrating as quite often you might want to adapt and create more fields etc. later on.

TOPICS
Acrobat SDK and JavaScript, Create PDFs, PDF forms

Views

72

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

JavaScript to reset fields on specific page within document

Explorer ,
Oct 10, 2020

Copy link to clipboard

Copied

Hi,

 

Am wondering if there is a script that would allow for a single page of field entries a user has made, to be cleared in entirety, likely using the function;

 

this.resetForm() 

 

Ideally looking to achieve this with script that doesn't require naming each field individually (lots of fields!) like the example shown below, but perhaps just allows the reset of the page itself?.

 

this.resetForm(["Field1", "Field2", "Field5"]);

 

The standard reset form function in DC Pro is somewhat annoying in as much as if you then add more fields later on after setting which specific fields you have ticked earlier on in making the form, it seems to add those new fields as well, which is frustrating as quite often you might want to adapt and create more fields etc. later on.

TOPICS
Acrobat SDK and JavaScript, Create PDFs, PDF forms

Views

73

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
Oct 10, 2020 0
Contributor ,
Oct 10, 2020

Copy link to clipboard

Copied

Do you want button on each page that will reset that page or you want button on first page that can reset any page?

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
Reply
Loading...
Oct 10, 2020 0
Explorer ,
Oct 10, 2020

Copy link to clipboard

Copied

Hi Asim123,

 

Button on each page that will reset that page.....;-)

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
Reply
Loading...
Oct 10, 2020 0
Engaged ,
Oct 10, 2020

Copy link to clipboard

Copied

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
Reply
Loading...
Oct 10, 2020 1
Explorer ,
Oct 10, 2020

Copy link to clipboard

Copied

Hi NesaNurani,

 

Yes, did see that - but couldn't get it to work ;-(

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
Reply
Loading...
Oct 10, 2020 0
Explorer ,
Oct 10, 2020

Copy link to clipboard

Copied

Durr....my bad....i'd added a typo character when copying - works like a charm - thanks!

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
Reply
Loading...
Oct 10, 2020 0