Skip to main content
Inspiring
April 26, 2018
Answered

how to hide a button on submitted form

  • April 26, 2018
  • 1 reply
  • 4662 views

Hi Everyone

New and learning Adobe User here.

I'm trying to find a way to hide the submitted button on a form that is submitted via email so it does not show up on the submitted copy.

I have tried the show\hide action for the button but it does not seem to work in this case so I'm thinking that it will take a Java based command but I don't know enough about it and if someone could please provide some script that would work in this case.

Thanks

This topic has been closed for replies.
Correct answer try67

Hi try67

I noticed that the script has a mail command in it,  will I have to remove the Submit Form action from the actions menu or can I leave it in and remove the command out of the script?

I also have another JavaScript to flatten the document before sending.

Thanks ahead of time and you have been a big help.


Yes. You will have to do everything in a single "Run a JavaScript" command, or you won't be able to control the order in which the commands are executed.

1 reply

try67
Community Expert
Community Expert
April 26, 2018

You can do it like this:

event.target.display = display.hidden;

this.submitForm({cURL: "mailto:me@server.com", cSubmitAs: "PDF"});

Note that you should remove all other commands associated with the button if you use this script.

Inspiring
April 26, 2018

Hi Try67

Now is this a command that is run under the Actions menu JavaScript or is this embedded into the document JavaScript menu?

try67
Community Expert
Community Expert
April 26, 2018

Assuming you have a Submit button in your file, you should use it as that button's Mouse Up action.