- 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-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-17-2018 09:02 AM
Zeeshan,
Thank you for your response. For this case, I specifically need to hide/disable the Submit button.
Shane

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2018 10:15 AM
I don't think you can hide or disable the button but like Zeeshan has you can create an onsubmit script to prevent them from submitting it which effectively is disabling it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2018 11:01 AM
Zeeshan,
This worked perfectly! I guess that I wasn't following what you were saying originally, but I just tested it and got the results that I needed.
Thank you,
Shane