Monday 8 July 2013

Client side error checking is complete

I have now checked all the scripts and added our client side form verification into them.

This uses a mixture of HTML 5.1 validation, JavaScript validation, and if both of these fail then server side error checking. This also uses Tim's new dialog boxes which makes the interface look so much nicer. An example of this is:
I am sure everyone will agree this looks so much nicer than the standard browser message boxes.

Any fields that are mandatory are highlighted in a different colour. Here you can see that the customer name field is mandatory, whereas the first line of the address is not.
Now if I try to submit this form with the customer name field empty, in an HTML 5.1 compatible browser this happens:
As you can see the browser surrounds the input box in a red border and provides us with a nice error message telling us what needs doing.

If we had used a non HTML 5.1 compatible browser, then the browser automatically checks using JavaScript and gives us the following message.
and the incorrect field is again highlighted in red.

If the browser has neither HTML 5.1 compatibility or JavaScript then the form will still be checked on the server side, and this message will be provided:
So as you can see all bases should be covered. This gives KwaMoja a nice modern form checking system, that looks nice, is quicker to respond, and provides helpful tips to the user as to how correct the problem.

Thanks to Tim Schofield for his help and patience on this.

No doubt Phil Daintree will copy this work into webERP and claim that he was the author of it.

No comments:

Post a Comment