Button with JavaScript to add a template page works, but is GREYED out.

New Here ,
Aug 24, 2017

Copy link to clipboard

Copied

I've created a button that uses JavaScript to add a template page to the end of our document. The button works, but it is greyed out. I titled the button "Additional Page", but the button is solid grey with no font. I've checked and the fill color is grey and the font color is black.

I'm not sure what to do!! I'm not familiar with JavaScript - found the code online, so detail is appreciated.

This is the code I'm using. var a = this.getTemplate("Page 5");a.spawn();

In Prepare Form Edit mode, the text shows up, but it doesn't in Preview mode.

TOPICS
Acrobat SDK and JavaScript, Windows

Views

118

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

Button with JavaScript to add a template page works, but is GREYED out.

New Here ,
Aug 24, 2017

Copy link to clipboard

Copied

I've created a button that uses JavaScript to add a template page to the end of our document. The button works, but it is greyed out. I titled the button "Additional Page", but the button is solid grey with no font. I've checked and the fill color is grey and the font color is black.

I'm not sure what to do!! I'm not familiar with JavaScript - found the code online, so detail is appreciated.

This is the code I'm using. var a = this.getTemplate("Page 5");a.spawn();

In Prepare Form Edit mode, the text shows up, but it doesn't in Preview mode.

TOPICS
Acrobat SDK and JavaScript, Windows

Views

119

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
Aug 24, 2017 0
Adobe Community Professional ,
Aug 24, 2017

Copy link to clipboard

Copied

It's not greyed out. It's just grey... the default color and you probably haven't added a label. Go into the properties again and set a label in the "Options" tab to set the text to be displayed on the button.

Also, do you actually have a template page named "Page 5"?

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...
Aug 24, 2017 0
New Here ,
Aug 25, 2017

Copy link to clipboard

Copied

Oh gosh! Thank you!! I was looking in way too deep. Thank you!! I'll try this out in the am.

Yes, that's the name of my template, and that's what I put in the text box i added (not sure the purpose of the text box).

Based off instructions I found on someone's site:

- I inserted a new file to the end of my document.

- added a text box on the new page (I don't understand this importance of this step, but I did it)

- created a template from the new page, and hid it

- that's when I added the button to a different page that the user can click if they want to view the hidden page

Sent from my iPhone

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...
Aug 25, 2017 0