How to highlight a field in Service Portal?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2017 09:51 PM
Hi Team,
This is a relatively simple question but unfortunately i do not know the exact syntax to use. In our service portal > catalog items > there is a phone
number field. I have written a catalog client script to validate the phone number field to have only 10 characters and it should all be numbers only.
I have set up an alert but unfortunately this is NOT the exact solution. I want to be able to HIGHLIGHT the PHONE NUMBER field in RED if
there is an invalid format. How can this be done? What additional syntax / code do i need in my script. I have attached the script below.
All help is appreciated.
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2017 10:13 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2017 10:25 PM
Hi Abhishek,
I have got that working now. The only issue is that the "SCROLL" function does not work. I want the page to scroll up to the error field once the submit button is clicked. but it does not seem to work.
I have used :
g_form.showFieldMsg('port_number',"Existing Number should only contain 10 digits","error",true);
Thank you