- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2020 06:31 AM
Hello! I'm trying to hide the submit button for just one record producer (creates an incident), but I only want to hide it temporarily. There are going to be a bunch of choice options, and the next field won't appear if the wrong choice is selected. If the end user makes it to the bottom and properly answers the last question, then I want the submit button to appear. Is there an easy way to make this happen (an onLoad client script maybe?)? I was looking through past threads, but nothing I saw seemed to be working.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2020 07:24 AM
https://community.servicenow.com/community?id=community_question&sys_id=091db558dbd7e3802e8c2183ca961931

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2020 06:45 AM
I would advise against DOM Manipulations, better to use Onsubmit Catalog Client scripts for your validations to not allow users to submit without the required details configured in your Onsubmit client scripts.
Hope this helps!
Thanks,
Saji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2020 06:51 AM
Thank you for the advice. However, for the nature of this form and for the direction given on how this form should function, the submit button needs to be hidden.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2020 07:22 AM
Try this code then document.getElementById("submit_button").style.display = 'none';
You would need a Onload Client Script and make sure the Isolate Scripts field is set to False on your Catalog Client script(The field would be in backend).
Please Mark as ✅ Correct if this solves your issue and also mark ???? Helpful if it helps resolve your problem.
Thanks,
Saji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2020 09:01 AM
The submit button is still there, and there is a javascript error on the form. Plus, how would I make the button come back when the specific variable is answered correctly?
I appreciate the help!