The hack is awful

Just have a detachable model that holds on first render the defaults
then when a submit is done populate the object (another) that you want

On 07/07/2009, Martin Makundi <[email protected]> wrote:
> The hack is cleaner
>
> 2009/7/7 James Carman <[email protected]>:
>> On Tue, Jul 7, 2009 at 10:51 AM, Martin Makundi <
>> [email protected]> wrote:
>>
>>> > Typically to prefill a form you have the backing model object have
>>> > sensible defaults.  i.e., a form that edits a person is given a
>>> > person, and the person object has it's gender set to "male" as a
>>> > default - that is reflected in your form when it is rendered.
>>>
>>> The problem is that it is not a NEW object. It is an old object with
>>> "proposed new values" which the user must SUBMIT in order to be stored
>>> into the object etc.
>>
>>
>> So, create a new object and merge it upon success?
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to