The need for javascript validation in forms.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

The need for javascript validation in forms.

Ahmed Mohombe
Hi,

I made a few proof of concept tests with bigger forms with Click, and unfortunately having no
browser side validation makes them very uncomfortable for the users.

I made the tests last week in our intranet, replacing(trying to :) ) our internal survey
application. I overlogged the forms, and supplied extra forms for the users to get from
them feedback about the usability of the forms/framework:
Even if I tried to design the forms nice, with many hints and help texts, it seems that most users
have problems:
- users will fill many fields wrong: at every 4 fields one triggers a validation error.
- if the forms have more than 10 fields, and the form reloads, they feel frustrated - javascript is
something else.
- most users (even if non technical), know that for forms they need javascript activated(maybe used
from e-bay? :)). It seems that they are accustomed to fast feedback about field validation errors,
and use them as 'help'/'guide'.

So the conclusion is that we need to add very fast support for javascript validation(and field sets
-> it was a nightmare to make the forms without direct Click support for the fieldset HTML element).

The approach adopted by some of the MVC frameworks to implement javascript validation seems however
very complicated.

A very simple solution seems to me to automatically integrate wForms into the Form Control:
wForms from http://www.formassembly.com/
I think this will require just to follow some conventions and a few defaults so the Form
control should enforce them if the programmers selects "form.setJSValidation(true);".
It has support for i18n and it seems by far the most complete and less bug bloated form library.
I tested all the other available javascript libs available for free, and unfortunately the others
lay way behind.
Implementing our own javascript validation lib seems an overkill form me since the browser
compliance is a very hard work, takes lot of time and test cases.
Javascript validation however falls clearly in the 80% and most of the users need it.

Letting this task (to integrate javascript validation in Click Forms) on the users(programmes),
kills the simplicity of Click and it's arguments over other MVCs, so the Form Control should be by
default javascript aware.

What do you think, should we use wForms?

Thanks in advance,

Ahmed.



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Click-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/click-development
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: The need for javascript validation in forms.

Malcolm Edgar-2
Hi Ahmed,

I think JS validation is an important feature and does fall in scope. I
haven't gotten around to it yet.

The Struts technique of displaying a big alert dialog is easy, but
pretty ugly.

The technique I was hoping to use was to display a div with the error
messages, so it looks identical to the serverside validation.

What sort of validations are you after straight up?

regards Malcolm Edgar



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Click-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/click-development
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: The need for javascript validation in forms.

Ahmed Mohombe
> I think JS validation is an important feature and does fall in scope. I
> haven't gotten around to it yet.
My proposal was however NOT to implement from Zero our own JS library :).


> The Struts technique of displaying a big alert dialog is easy, but
> pretty ugly.
For all projects I worked before and Struts was the MVC, the customers didn't
accepted the ugly Struts defaults that we had at prototype shows :).
We ended having our own customized version of Struts that had almost nothing in common with Struts
:). So even if Struts was easy and good for some tasks, it was very restrictive with others.

> The technique I was hoping to use was to display a div with the error
> messages, so it looks identical to the serverside validation.
Well, please look at wForms. There are many documents there.

> What sort of validations are you after straight up?
The most common of course -> those present in most forms.

For custom and special validations it's understandable that the programmer falls in the 20% :),
so he must do something more to archive the requirements, but still, the framework must make it
possible. With some of the MVC we tested, this was simply impossible, or overriding core classes was
needed make it work -> hence no need for the MVC framework itself :).

Thanks in advance,

Ahmed.



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Click-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/click-development
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: The need for javascript validation in forms.

Ahmed Mohombe
In reply to this post by Malcolm Edgar-2
> The technique I was hoping to use was to display a div with the error
> messages, so it looks identical to the serverside validation.
wForms doesn't look identical with Click serveside, but the feedback seems pretty good.
See this default example:
http://www.formassembly.com/form-view.php?formID=29

Of course, it can be further customized to look more like Click or to use the same stylesheet.

Ahmed.



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Click-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/click-development
Loading...