Restrict the request submission
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2024 02:52 AM
Hi All,
Having a requirement that,
We are having a catalog form, where it contains three fields
1- Student name (reference to user table)
2- Course( reference to course table)
The validation that we need to set on the form before submission is
> If the student is submited a request for a course (which is active ) restrict the another request submission for the same course.
> if the student submitted a three course requests need to restrict not to submit another one. (limit is three requests submission which are active.
Need suggestions to achieve this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2024 02:57 AM
Hi @Community Alums,
You can create a onsubmit client script along with Script Include Ajax call checking for no of open request by requested by and see if the active course is already submitted.
I hope this logic will help you build the code. Let me know if any questions...
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2024 06:32 AM
Hello @Community Alums ,
It can be done via the OnSubmit client script.
onSubmit() script runs when a form is submitted. Typically, you use an onSubmit() script to validate things on the form and ensure that the submission makes sense. As such, onSubmit() scripts can potentially cancel a submission by returning false.
Please Refer to
If you found my response helpful, please consider marking it as "Helpful" or "Accept Solution." Thank you!