Jacky schrieb:
Hi all, some question about the validation plugins.
There is a form with:
- some search fields
- a table of search result with checkboxes
- some buttons to do next action with checked records
Currently, the form is placing error message after each search fields.
However, I also want to validate the button click, so that user must
check something before proceed to next.
So it would be inappropriate to display error messages after checkbox.
I want to place a <div> and says 'Please check records before proceed!'.
As sometimes there will be no 'checkbox', it seems not good to place a
rule in the option.
I realize one of the way is to use submitHandler as a final check on
that.
But then I have to manage these 'global errors' manually.
Is there any recommended way to do it?
You could add a hidden field somewhere, put a custom rule on it that
checks if all checkboxes are checked, and gets the error message
displayed beneath it, eg. place it where you want the error message to
be and hide it via display:none.
Let me know if that helps.
Jörn