how to avoid blank spaces in field value at begining and ending
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2016 06:13 PM
my question is name field value contains any blank spaces at beginning and ending form is not submitted.
so please tell me on submit code for that..
Thanks,
Rambabu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2016 11:58 PM
You can write an onChange Client script on the name field to check for any leading or trailing spaces and show an error if it does have one.
You can use the below Code:
var name = " Arjun Gupta ";
var res = name.match(/^\s+|\s+$/i);
if(res!== null){
alert("Spaces are not allowed at the begining or ending of the Name")
}
PS: Hit like, Helpful or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2016 12:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2016 01:15 AM
In the beginning of the on submit client script , write
g_form.hideFieldMsg('u_name', true); // assuming u_name is the column name
Thanks,
Mihir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2018 11:15 PM
g_form.getValue() is giving error in service portal.