Restrict form submission when the script include return a value to onsubmit client script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2024 08:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2024 08:47 AM
@Sangeetha7996 : What is issue/question here you are looking for?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2024 08:50 AM - edited ‎07-29-2024 08:51 AM
Catalog form should not allow user to submit when certain business service is selected. (should be dynamic)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2024 09:09 AM
@Sangeetha7996 Okay.
This will not work as per ask because you're using an asynchronous call to the server and the client script isn't waiting for a response to come back. While this is best practice, it simply won't work in an 'onSubmit' script for validation because the submit happens and redirects without waiting. You need to use a synchronous call whenever you need this type of response. In this case,you need to use onChange Client script on field of Business Service by calling the script include.
Hope it helps.
Please mark my response as accepted/helpful if it helps.
Regards,
Priyanka Salunke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2024 09:24 AM
How can I restrict form submission with an onChange script.