Disable submit button on service portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2017 10:03 PM
Hi Friends,
I want to hide or disable a button on a portal page depending on some data which may be access by Glide Ajax.
How can I achieve the same.
Please help.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2017 11:39 AM
If this is a submit button that would be seen from a Record Producer or Catalog Item, you could disable the Submit button using an onSubmit Catalog Client Script in the Record Producer/Catalog Item.
Ensure that the onSubmit Catalog Client Script has a UI Type of "Both", add in your conditional criteria for when you would want to disable the Submit button, and end that conditional criteria with "return false;" For instance:
function onSubmit() {
if (g_form.getValue('subcategory') == 'DisableSubmit') {
var message = '';
message = message + 'Submit is disabled for the specific subcategory' + '\n' + '\n';
alert(message);
return false;
}
}
I hope that this helps,
- Mel

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2017 11:57 AM
you can add the condition accordingly for hiding/showing in condition field of the button/ui action.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-10-2018 05:36 AM
function onSubmit() {
if (g_form.getValue('category name') == 'name of the choice')
{
g_form.addErrormessage("Your Selected choice is Disabled");
return false;
}
}