
- 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 11:47 PM
Not working.
I am not sure if I am using the code correctly.
Regards,
Nisha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2019 11:54 PM
Hi Nisha,
Can you check by adding an alert inside that also check document id of submit button is proper
function onLoad(){
$j(document).ready(function(){
alert('inside form load complete and before showing');
$j("#submit").show();
});
}
}
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-08-2019 01:44 AM
Hi Ankur,
This code will work for ITIL view. But the button which I want to hide on Load is on service portal view. So, can we use any angular directive or something to hide this submit button until the mandatory field is filled in.
Attached below is screenshot of the view which I am referring to here...
Regards,
Nisha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2019 01:50 AM
Hi Nisha,
So is that code working fine in native. For Service portal you can use angular directive but not sure on that since not worked on that.
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-08-2019 01:52 AM
just check whether you have checked ignore mandatory validation it should be unchecked
Please, remember to mark Correct or Helpful if you find my response useful.