- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â07-19-2016 08:51 AM
Hello,
I want to developp a record producer that contains a field wit h name: receipt_number (it should numeric in 15 chars), on submit I have to validate this field. to do that I added the following script:
En-tĂȘte 1 |
---|
var receiptNumber = producer.receipt_number; if(receiptNumber.toString().length != 15 || isNaN(receiptNumber)){ gs.addErrorMessage('The receipt number should be in 15 digits.'); current.setAbortAction(true); // code to add here in order to stop redirection!? } |
The validation works, but the problem is that I have to stop redirection in case of error. Can you find how I can do it (stop the redirection and stay in the current form view)
Thanks in advance!!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â07-19-2016 09:02 AM
You can write an onSubmit client script and do your validation there and return false; to stop the submission.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â07-19-2016 09:02 AM
You can write an onSubmit client script and do your validation there and return false; to stop the submission.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â07-19-2016 09:25 AM
Thank you very much, it works

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â07-19-2016 09:36 AM
Glad I could help