Skip to main content
Participating Frequently
April 24, 2024
Answered

Hide button when greater than page count

  • April 24, 2024
  • 1 reply
  • 594 views

hello all,

 

    i am very new to coding in javascript, but have experience in others.  anyway basically i am trying to get a form to have a button, and when pressed it genterates template pages.  this part i have completed so far without an issue.  but what i would also like to do is once it generates those pages, hide the "Create" button so no more pages can be added, unless all additional pages are removed, then the button is visible again.  is this possible at the document level javascript by chance?

This topic has been closed for replies.
Correct answer try67

You need to do it from the code the generates/deletes the pages.

To hide the button you can use this:

event.target.display = display.hidden;

To show it later on (from a "reset"-type button), use this:

this.getField("Create").display = display.visible;

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
April 24, 2024

You need to do it from the code the generates/deletes the pages.

To hide the button you can use this:

event.target.display = display.hidden;

To show it later on (from a "reset"-type button), use this:

this.getField("Create").display = display.visible;

Participating Frequently
April 24, 2024

awesome this worked perfect. thank you so much for the help