How set read-only submit button in service portal and platform
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2023 05:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2023 06:00 AM
Hello @Hemanth267
var bt = document.getElementById('button_name');
bt.disabled = true;
Plz mark my solution as Accept, If you find it helpful.
Regards,
Samaksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2023 06:37 AM
where I need to write this script ? in widget HTML page?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2023 06:03 AM
Instead of disabling a button (I assume conditionally, you've given 0 detail in regard to requirements), you usually setup a Catalog Client Script that will runs onSubmit and prevents submission. Example below:
function onSubmit() {
var checkbox = g_form.getValue('ac_found');
if (checkbox == 'true') {
alert('Selected user already has an active access record. You will be unable to submit this request.');
return false; //prevents submission if condition is met
}
}
Best I can offer up for 'disabling a button' is a Google search: https://www.google.com/search?q=bootstrap+disable+button&rlz=1C1GCEO_enUS1020US1023&oq=bootstrap+dis...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2023 06:31 AM
I need to disable/Read-only on portal