13 Sep 2006 18:04
[FormBuilder] 3.05 callbacks; new list server
Nate Wiger <nwiger <at> gmail.com>
2006-09-13 16:04:43 GMT
2006-09-13 16:04:43 GMT
First off, welcome to the "new and improved" fbusers list; I migrated
everything to a new server running mailman. Let me know if anything's
screwed up.
Second, I've been working alot with AJAX, specifically the Yahoo UI
and JQuery lately. I'm thinking about adding success/failure callbacks
to 3.05 ala YUI. These could be used instead of the standard:
if ($form->submitted && $form->validate)
My thinking is something like this:
FB->new(
..., callbacks => {
success => \&sub1,
invalid => \&sub2,
});
If FB sees these are defined, it will change its default behavior and
automatically invoke these for you as part of a new finalize() method.
The end result is an easy plugin to Catalyst, and without Catalyst it
would be:
$form = FB->new(callbacks => { ... });
$form->field(name => 'tweakme', etc => ...);
print $form->finalize;
By invoking finalize(), you're basically doing this:
(Continue reading)
RSS Feed