How to hide buttons on the form?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2015 01:57 PM
by default ServiceNow has two set of buttons one set on the top header of the form and one set is bottom of the form. i want to hide bottom set of buttons.
bottom button html code
<button onclick="return gsftSubmit(this);" style="white-space: nowrap" name="not_important" class="form_action_button action_context btn btn-default" type="submit" id="sysverb_update" value="sysverb_update" gsft_id="42df02e20a0a0b340080e61b551f2909">Save & Exit</button>
top header button html code
<button onclick="return gsftSubmit(this);" style="white-space: nowrap" name="not_important" type="submit" class="form_action_button header action_context btn btn-default" id="sysverb_update" value="sysverb_update" gsft_id="42df02e20a0a0b340080e61b551f2909">Save & Exit</button>
any thoughts?
CCing
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2015 01:05 PM
After little bit of research i came up with my own own method.( verified with fuji global scoped applications)
setButton('form_action_button action_context btn btn-default','none');
function setButton(butname,style) {
var refs = document.getElementsByTagName("button");
if (refs) {
for (var i=0; i < refs.length; i++) {
var teststr = refs[i];
if ($j(teststr).hasClass(butname)) {
refs[i].style.display = style;
}
}
}
return true;
}
It will hide buttons on bottom of the form.
Thanks all for your time.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2015 02:34 AM
Close off the loop if the issue is resolved as it might help others to take notice of the solution. Thanks !

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2015 05:51 AM
Very late but still for your information.
Check this post - https://community.servicenow.com/thread/194103
Mike Allens solution might work for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-16-2022 01:04 AM
Hey @nthumma , thanks for sharing this. However, this didn't work. I copied exactly in onLoad script but bottom buttons still appear. Dumb question: is there anywhere I should change in the code? Advanced thanks!