[html-formfu] Clientside validation
Moritz Onken
onken at houseofdesign.de
Wed Mar 5 09:16:16 GMT 2008
Hi,
I'm using the extJS framework in combination with formfu. It allows
you to send the form data to your server and parses the returned
messages and prints them next to invalid form fields. It is JSON
based, but with a little bit of code you can easily return the formfu
error messages usign JSON.
if ( $form->has_errors ) {
$c->stash->{success} = 0;
for ( @{ $form->get_errors } ) {
push(
@{ $c->stash->{errors} },
{ id => $_->name, msg => $_->message }
);
}
this is a catalyst example. Make sure to set the view to JSON.
Am 05.03.2008 um 10:07 schrieb Andreas Marienborg:
> Has anyone done any clientside validation with FormFu? Basicly I
> want to only specify constraints etc once, in the FormFu-config, and
> then just have it magicaly work on the forms in the web app, or
> atleast provide me with the information needed to do the client side
> stuff (like what constraints are on a field etc).
>
> If that is not possible, is it possible to process only "part" of a
> form? So I can call back to the server to check each field as they
> are filled out?
>
>
> If anyone has any thoughts on any of this, I would be glad to hear it
>
>
> - andreas
>
>
> _______________________________________________
> HTML-FormFu mailing list
> HTML-FormFu at lists.rawmode.org
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
More information about the HTML-FormFu
mailing list