- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2023 10:45 PM
Hi,
we have the below scenario for one of our client.
based on employee type we need to show submit button to submit the request on service portal.
for this I have written client script on onload. But not understanding how to achieve this
if(g_form.getValue(employee_type) == ‘full time’){
show submit button
}else {don’t show}
please help me with the scripting
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2023 04:59 AM
are you sure Isolate script field is marked as False for your client script?
Share the latest script and what debugging have you done so far?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2023 11:19 PM
@OlaN that was the requirement that can't be changed . we have to hide submit button is there any solution to hide submit button?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2023 11:25 PM - edited 09-24-2023 11:30 PM
Is this submit button on Portal page or native UI?
screenshot would be helpful
The below script will do
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2023 04:10 AM
@Harish KM for employee type full time also submit button was disappearing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2023 11:29 PM
Hi,
you can use onSubmit catalog client script and stop the form submission.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2023 04:59 AM
are you sure Isolate script field is marked as False for your client script?
Share the latest script and what debugging have you done so far?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader