> -----Messaggio originale-----
> Da: Justin Patrin [mailto:papercrane gmail.com]
> Inviato: domenica 26 marzo 2006 9.54
> A: PEAR Dev List <pear-dev lists.php.net>
> Oggetto: [ok] [PEAR-DEV] HTML_QuickForm DHTML client
rules
> and SoftRequired rule
>
> At the request of a user I've made a QuickForm class
which
> alters the client rule system to display errors with
each
> field, much like QuickForm's default renderer normally
does
> upon submission. (Note that I didn't try to make it
> *perfect*, I was just trying to get it to work
> It also
supports running client rules when a field loses
> focus, its value changes, or a key is pressed. For this
last
> to work you have to call getValidationScript() before
your
> form is rendered.
>
> The way that this works depends a bit on the normal
renderer,
> but a user could easily create divs to put the errors
in a
> specific place.
>
> I've also looked again into the idea of a SoftRequired
rule
> which makes an error show up the first time a user
tries to
> submit a field without a value, then goes away if the
form is
> submitted again. I tried before to create this as a
normal QF
> rule, which is nearly impossible given QF's limited
rule
> system. However, this time I limited it to a client
rule and
> it works just fine (albeit with a simple hack to
simulate a
> static variable).
>
This is a good job ;)
But... This is a series of client rule.
How can you make the same with server rules? AJAX?
If this rules are default rules, (e.g: when i set a server
rule
automatically a client DHTML rule is setted up)
this is a good idea.
Bye ;)
--
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|