Does not contain query in onsubmit script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 05:59 AM
Hi All,
Basically, my requirement is a prefix check on the form , if the name does not contain the "GDC" prefix, the form should not be saved, preventing the user from changing the prefix.
Based on the organization, name prefix will automatically populate, attached screenshot for reference.
Tried this code:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2024 05:20 AM
Hi @Sohithanjan G @yad_achyut ,
Thank you so much for your Help 🙂
They just want to display the highlighted text because the error message may get longer in the future if there are more than 10 or 20 dropdowns.
Thanks,
CD
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2024 05:58 AM
Hi
You can try with client script i.e = OnSubmit()
var name = g_form.getValue('name')
if(name.search(/IN-GDC/) !=0)
{
return false
}
else
{
return true
}