is this a question or a suggestion? ;-)

On 2 Lug, 07:20, selecta <[email protected]> wrote:
> I want to change the value of a field that is writable=False of a form
> that was created with crud.update
>
> def edit():
>     table, record = getTableRecord(request)
>     if record:
>         #this will show the right content but will not be stored in db
>         record.created_on = request.now
>         record.edited_by = auth.user.id
>     #this does not have any effect
>     table.created_on.default = request.now
>     table.edited_by.default = auth.user.id
>
>     form = crud.update(table, record, onaccept=crud.archive, deletable
> = False)
>
>     #this also does not have any effect
>     form.vars.created_on = request.now
>     form.vars.edited_by = auth.user.id
>
>     return dict(form = form)

Reply via email to