
- 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 09:36 PM
Hi Nisha,
If that variable is mandatory then system should stop the submission. because user is clicking submit before the complete form loads this issue is coming up.
just check why form is taking so long time any onload or ui policy which is impacting the performance
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2019 09:42 PM
Hi Ankur,
Yes there are 4-5 client scripts which r onLoad. We can't change it.
But can we restrict user to submit the form before it loads properly and mandatory field is filled.
Regards,
Nisha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2019 09:48 PM
Hi Nisha,
you can use following code; which would do following; you can give a try and check
give the document id of the submit button
1) wait for the complete page to load then show the submit button
function onLoad(){
$(document).ready(function(){
$("#<buttonId>").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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2019 09:52 PM
And what if i want to make the button greyed out for the user until that mandatory field is filled in?