- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2018 01:53 PM
Can anyone provide help on how I can hide/disable the Submit button when a record producer Yes/No is selected?
variable type: Yes/No
variable name: software_ss_reset
Action needed: When 'No' is chosen from the record producer variable, software_ss_reset, I want the Submit button to hide OR disable.
I added the script below to the Script box in the record producer, but it is ignored as the user can still submit even though No is chosen on the variable.
//Remove the Submit button
var pwsr = producer.software_ss_reset;
if(pwsr == 'no') {
current.setAbortAction(true);
gs.addErrorMessage('Please use the SOFTWARE self-reset feature instead of submitting this form');
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2018 04:50 PM
Hi,
You can implement this by creating an onSubmit catalog client script on the record producer with below code.
if(g_form.getValue('software_ss_reset') == 'No') {
alert('Please use the Software self-reset feature instead of submitting this form');
return false;
}
This will not hide/disable the submit button, but it will prevent user from submitting the form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2018 06:11 AM
mahi9315,
Both "no" and "No" showed in the alert so both worked as far as the alert, but neither disabled/hid the Submit button. The solution that I marked as correct justified my need so no further actions are required. I really appreciate your help. Thank you very much.
Shane

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2018 04:58 AM
You have to be careful with scripts like this. This would not work in the Service Portal if you are using it or start to use it in the future. $$ is not supported coding.