[html-formfu] Prototype && HTML::FormFu
Brian Cassidy
brian.cassidy at nald.ca
Mon Aug 20 12:58:52 GMT 2007
Hi,
I've noticed Carl's Dojo-based widgets in the svn repository, and since
i've been doing some work with formfu and prototype ( + scriptaculous),
i thought it might be nice to have something similar for that combination.
I hope this thread will answer some questions i have about making custom
elements and perhaps some best practices will come out of it.
I decided to start with a simple auto-complete element. I can envision
the yaml file looking something like this in it's simplest form:
- name: foo
type: Prototype::Autocomplete
url: /foo
Q: to set the url programatically, say, via the catalyst context, would
the best practice be to override the element with a custom one that does
just that? (in new() perhaps?)
Further to the above config, you can set the update_id, and also a
generic set of "options" to be passed along.
With respect to the update_id, if it's not specified then it is auto
generated as "${id}_auto_update" -- this element most likely does not
exist and much be created.
Q: (more of an api question...) If update_id is specified, should i
assume the user will generate that element themselves?
Q: What's the best practice for injecting elements into the form from
custom elements?
I see the the Dojo::Repeatable element, you're adding some elements to
_custom_elements() -- should i copy that practice?
That should get me started... thanks in advance!
-Brian
More information about the HTML-FormFu
mailing list