Mandatory fields on service portal

moncef
Tera Contributor

Hello, 

When submitting a form on portal i want to see the error message for mandatory variables on alert popup like this : 

find_real_file.png

and not like this : 

find_real_file.png

There is any solution for that ? 

Thank you.

5 REPLIES 5

Mark Roethof
Tera Patron
Tera Patron

Hi there,

The addErrorMessage you are referring to is set up in the SC Catalog Item widget. There's no out-of-the-box configuration to change this. You could overwrite the CSS, so you don't have to change to widget, though this still does not give you a popup/dialog window.

If you would want to have a dialog window, you really have to clone and edit the SC Catalog Item widget.

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark

---

LinkedIn

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Hello Mark,

Which style is applicated on the widget ? do you have any idea ? 

Thank you. 

Hello Mark, 

i don't do anything to show this error message, and i don't find this on my widget, do you speak on a specific widget? 

Can you tell we wich widget?

Thank you.

The "SC Catalog Item" service portal widget.

In the widget Body HTML Template, you will find:

<div class="row" ng-if="hasMandatory(c.mandatory)" class=" row alert alert-info-border" style="margin-top: .5em">
  <div class="col-sm-12">
    <div ng-if="hasMandatory(c.mandatory)">${Required information}</div>
    <label ng-repeat="f in c.mandatory" class="label sc-field-error-label">{{::f.label}}</label>
  </div>
</div>

There are some classes mentioned in here. You could overwrite this CSS in your Portals or Theme CSS variables.

If you really want to go for a dialog window or something, you would need to clone and modify the widget.

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark

---

LinkedIn

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn