Template Spawns with Generic Field Without Name

Contributor ,
Jan 09, 2020

Copy link to clipboard

Copied

I'm having an issue with a form I've been developing where spawning a page turns half of the text fields and one combobox into this generic field without a name (instead of saying text or combo in properties, it just says field).

I have a four page form with pg. 0 as the cover page and selections made on that will spawn one of the other three pages. The other three pages spawn great and page 0 is the least complex of all the pages.

There's also a button on the three spawned pages that will delete the cover page then show a button that will spawn the template back to page 0 if required. I figured out through trial and error that I needed to spawn the cover page and hide the original, otherwise page 0 would be deleted.

The code is really simple to create the field and no different than the way the others are created, spawning to 1 and using bRename and bOverlay as false.

 

this.getTemplate("Cover").spawn(1, false, false);

 

Most Valuable Participant
Correct answer by try67 | Most Valuable Participant

That usually means there's some kind of corruption in the file. Try deleting the fields, saving the file under a new name, re-opening it and then re-adding them.

TOPICS
Acrobat SDK and JavaScript, Create PDFs, PDF forms

Views

355

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

Template Spawns with Generic Field Without Name

Contributor ,
Jan 09, 2020

Copy link to clipboard

Copied

I'm having an issue with a form I've been developing where spawning a page turns half of the text fields and one combobox into this generic field without a name (instead of saying text or combo in properties, it just says field).

I have a four page form with pg. 0 as the cover page and selections made on that will spawn one of the other three pages. The other three pages spawn great and page 0 is the least complex of all the pages.

There's also a button on the three spawned pages that will delete the cover page then show a button that will spawn the template back to page 0 if required. I figured out through trial and error that I needed to spawn the cover page and hide the original, otherwise page 0 would be deleted.

The code is really simple to create the field and no different than the way the others are created, spawning to 1 and using bRename and bOverlay as false.

 

this.getTemplate("Cover").spawn(1, false, false);

 

Most Valuable Participant
Correct answer by try67 | Most Valuable Participant

That usually means there's some kind of corruption in the file. Try deleting the fields, saving the file under a new name, re-opening it and then re-adding them.

TOPICS
Acrobat SDK and JavaScript, Create PDFs, PDF forms

Views

356

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
Jan 09, 2020 0
Most Valuable Participant ,
Jan 09, 2020

Copy link to clipboard

Copied

That usually means there's some kind of corruption in the file. Try deleting the fields, saving the file under a new name, re-opening it and then re-adding them.

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...
Jan 09, 2020 1
Contributor ,
Jan 09, 2020

Copy link to clipboard

Copied

Just to further my understanding on templates, if I make a change to the master (original page) does that automatically update the template or do I have to delete the template and recreate it?

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...
Jan 09, 2020 0
try67 LATEST
Most Valuable Participant ,
Jan 09, 2020

Copy link to clipboard

Copied

Yes, it automatically updates it. The page is the Template.

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...
Jan 09, 2020 0