[html-formfu] Losing default value on update

Carl Franks fireartist at gmail.com
Thu Sep 2 20:50:38 GMT 2010


On 26 August 2010 18:02, Charlie Garrison <garrison at zeta.org.au> wrote:
>
> I've got a read-only field (from HTML::FormFu::Model::DBIC) which is losing
> the displayed value after form is submitted. I've tried various combinations
> of force_default, retain_default, etc but don't seem to be able to get the
> right configuration.

Hi,
Sorry, I'm not clear on exactly what behaviour you're seeing, and what
you're expecting - can you clarify?

> All other fields in the form get saved to the db as expected. Am I doing
> something wrong in the config or controller action?

Are you expecting the read_only field value to be saved to the database?

All the read_only option does is cause update/create to not update the
column corresponding to that field.

In the most basic use, it doesn't need force_default or retain_default
to be set - so can you explain what you're wanting that to do?

Cheers,
Carl



More information about the HTML-FormFu mailing list