Re: [html-formfu] Taking default value when not supplied in query (plaintext)

2010-10-19 Thread Carl Franks
Hi, > While the plugin approach works for many field types, it doesn't work > for others, like this Date element: >        retain_default: 1 That's because the Date element doesn't have a default() set. The plugin would need to be changed to support elements that have a retain_default() method.

Re: [html-formfu] Taking default value when not supplied in query (plaintext)

2010-10-15 Thread Wicked bits
I'm still really interested in having a more substantial capability to propagate default values into the params hash (or another hash) so it's in sync with internal form representation. While the plugin approach works for many field types, it doesn't work for others, like this Date element:

Re: [html-formfu] Taking default value when not supplied in query (plaintext)

2010-10-09 Thread Wicked bits
Thanks Carl, That works. When the plugin is active on a field, its default propagates into $form->params It seems to me that I'm not the only one who would want to have a ready way to read the computed state of a form's fields' values as a hash when working with forms that have defaults. Basica

Re: [html-formfu] Taking default value when not supplied in query (plaintext)

2010-10-09 Thread Carl Franks
On 9 October 2010 17:16, Wicked bits wrote: > Sorry for the mangled post, here it is plainly: > > When FormFu processes a query that contains only some of the defined > fields, how can the fields that don't appear in the query have their > default value(s) in $form->params? I think this should w

[html-formfu] Taking default value when not supplied in query (plaintext)

2010-10-09 Thread Wicked bits
Sorry for the mangled post, here it is plainly: When FormFu processes a query that contains only some of the defined fields, how can the fields that don't appear in the query have their default value(s) in $form->params? #!/usr/bin/perl use strict; use HTML::FormFu; use Data::Dumper; my $form