[html-formfu] Patch to allow "today" as the default date

Carl Franks fireartist at gmail.com
Thu Feb 21 11:05:04 GMT 2008


On 20/02/2008, Brian Cassidy <brian.cassidy at nald.ca> wrote:
> What i've found is that is that if the element already has a process()
>  method, then your plugin can't use process() -- perhaps I'm doing it
>  wrong? [1]

I've just committed a fix so that Date::process() calls next::method()
Was is the Date element you were having problems with?

Just to clarify some things:

* Any plugin class should inherit from HTML::FormFu::Plugin - see
Plugin/StashValue.pm for an example.

* If you call $form->plugin(), if there's a 'name' or 'names'
argument, the plugin is added to that/those named fields. Otherwise,
the plugin is added to the form.

* If you call $block->plugin(), a 'name' or 'names' argument is required.

* $field->plugin() needs no name argument, it's just added to that field.

* Plugins on fields currently only support 'process' and
'post_process' - I'm not sure that supporting the *render methods on
fields is a good idea.

>  [1] http://www.doingitwrong.com/ :)

Thanks - enjoyed it!

Carl



More information about the HTML-FormFu mailing list