Display error message in front of modal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2018 09:37 AM
My modal form displays in front of my questionnaire form using the calendar widget.
Entering an invalid date causes an error message to appear behind the modal. It is faded out. It is from the g_form.addErrorMessage(). We are prohibited from using 'alert'. The addInfoMessage() behaves the same.
If the user clicks anywhere on the screen, the modal closes and we can see the error message.
It will fade on its own or we can click the 'x' to close it.
We will have to re-open the modal to enter another date.
I have only found a way to display the error message at the top of the questionnaire form. Is there a way to display it at the top of the modal form where it can be seen?
- 1,244 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-21-2019 08:03 AM
Hi, we're running into the same issue, have you come up with a solution?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2024 07:10 PM
Hi. I encountered the same issue. I was working on a custom service portal. I have a custom widget that is getting displayed through a modal. The modal asks for some input which are mandatory. When a user clicks submit through the modal and missed some mandatory fields, I use the spUtil.addErrorMessage to throw out the error message. However the message displays behind the modal which is not a nice experience.
Is the modal getting called from a Service Portal page? If yes, then the knowledge article below might help.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0744933