[html-formfu] A generic way to fetch values from the stash?

Andreas Marienborg omega at palle.net
Wed Mar 26 13:04:14 GMT 2008


On Mar 26, 2008, at 1:46 PM, Carl Franks wrote:

> On 26/03/2008, Andreas Marienborg <omega at palle.net> wrote:
>> Currently, I use the Catalyst-plugin to stash the language the app is
>> deployed as in the formfu-stash. I would like to use this as the
>> default-value for the country dropdown, and as such came the idea  
>> of a
>> generic way to use stash-values. Not sure how to do it cleanly  
>> though,
>> so its more a random thought at the moment
>>
>>
>> any ideas? Can anyone else think of useful uses for such a feature?
>
> Can't really think of a generic way - but we could give all fields a
> default_from_stash($key) method?
> kinda like Model-DBIC's condition_from_stash()

Yeah, I was thinking about that, but then one might want  
attribute_from_stash, value_from_stash etc :p

I guess default_from_stash would solve my imidiate problem, so I guess  
I might just implement that, if thats ok?


- andreas



More information about the HTML-FormFu mailing list