Return false not working in on submit client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2024 09:15 PM
Hello Community,
There is a requirement where if a catalog form passes all the validations then only the form should be submitted otherwise we have to abort the on submit. It should not submit anything.
I used return false in my client script but still user able to submit the form. Please let me know for any other alternative to abort on submit action. Below is my script i used.
Script Include
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2024 08:58 AM
Hi @Sajal Chatterje , The issue is that date/time field is not compared as below
check_Delg.addQuery('starts', startdate);
check_Delg.addQuery('ends', enddate);
You need to compare it as greater than OR less than
if(startdate > enddate){
//perform some action
}
Could you provide me the requirement of comparing this field?
Mark this as Helpful / Accept the Solution if this helps.