[Html-widget] formfu - What's the best way to add dynamic defaults?

Daisuke Maki daisuke at endeworks.jp
Fri Mar 30 01:44:40 GMT 2007


nice, it works.

I understand how it works, but I think I'm going to need to fiddle with
this for while to really get the grasp of it.

--d


Carl Franks wrote:
> On 29/03/07, Daisuke Maki <daisuke at endeworks.jp> wrote:
>> It would be B)
> 
> Okay, I've had to add a new method to fields:
> render_processed_value(1) which overrides the default behaviour of
> displaying the un-filtered user input.
> 
> Save the attached files in the root of /trunk/HTML-FormFu/ and run
> `perl test.pl`.
> You can change $form->process() to pass either a valid or invalid
> date, and you'll see in the output that both $form->params and "$form"
> behave correctly.
> 
> I'm still going to think of a better way to handle this kind of thing 
> though.
> It's also possible that the render_processed_value() method might get
> replaced by something more flexible, to allow you to choose to display
> the input after filters or transformations, as it's a bit of a blunt
> instrument at the moment.
> 
> Carl
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Html-widget mailing list
> Html-widget at lists.rawmode.org
> http://lists.rawmode.org/cgi-bin/mailman/listinfo/html-widget




More information about the Html-widget mailing list