
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2019 09:34 PM
Hello Everyone,
I have a scenario in my order guide that when form is not loaded completely user directly clicks on submit button without filling the mandatory field and REQ is created but with no details.
So, can anyone suggest me how can I give an alert to the user that if he clicks on submit button without filling the mandatory field the REQ shouldn't be submitted.
Regards,
Nisha
Solved! Go to Solution.
- Labels:
-
Request Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2019 11:33 PM
For this i used ng-if directive with submit button, which made submit button to become visible after the user selected option in mandatory field.
<button ng-if="!hasMandatory()" ng-disabled="submitted" name="submit" ng-click="triggerOnSubmit()" class="btn btn-primary">{{submitButtonMsg}}</button>
<span ng-if="submitting" style="padding-left:4px">${Submitting...}</span>
This solved my issue. 🙂
Thanks everyone for all your inputs.
Regards,
Nisha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2019 10:01 PM
Hi,
if the above code works fine then it won't show the submit button unless complete form/page loads
not sure on the greyed out option.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2019 10:10 PM
where we will use this code. do i need to create a new client script(onLoad)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2019 10:27 PM
Yes create an onLoad client script.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2019 11:00 PM
I am using this code in the onLoad client script on order guide form(sc_cat_item_guide) to make the Submit button invisible on form load but its not working can you pls help me here...
function onLoad() {
document.getElementById('submit').style.display='none';
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2019 11:35 PM
Hi Nisha,
Can you check it with this?
function onLoad(){
$(document).ready(function(){
$("#submit").show();
});
}
}
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader