- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2024 11:41 AM
Hi All,
I have a requirement when the below option is selected i need to present the error message on the catalog item that should present the user from submitting it.
Below is the script that i wrote:-
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var sn = g_form.getValue("do_you_already_have_visual_studio_license");
if (newValue == "no" || sn == 'no') {
g_form.addErrorMessage("Please add GitHub Enterprise license to the service required field in this form");("Please add GitHub Enterprise license to the service required field in this form");
}
}
Its throwing the error message . But i am able to submit the catalog item.
How to prevent the submission of the catalog item when the error message is presented.
How to achieve this?
(Note: I did use the OnSubmit as well, still i am able to submit the form)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2024 12:30 AM
To achieve this requirement please use the on submit client script.
Check the variable and add the error message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2024 12:55 AM
Hi @phr,
Please check this below thread.
Please accept my solution if it resolves your issue and thumps 👍 up
Thanks
Jitendra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2024 12:30 AM
To achieve this requirement please use the on submit client script.
Check the variable and add the error message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2024 07:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2024 12:55 AM
Hi @phr,
Please check this below thread.
Please accept my solution if it resolves your issue and thumps 👍 up
Thanks
Jitendra