I have this controller function (simplified to make it easier to read):

def testing():
statuses = db(db.t_status.f_company==1).select(orderby=db.t_status.f_status)
    form = SQLFORM(db.t_ticket)
    form.vars.f_status = statuses[0].id
    if form.accepts(request.vars, session):
        response.flash = ('New ticket created')
    return dict(form=form)

When the form is shown Status dropdown is selected with the first value from db.t_status table.

When I fill out the form and submit it stores all values and a empty form is shown. But the Status dropdown is not selected. If I reload the page the value is shown in Status.

Any ideas whats wrong?


Kenneth

Reply via email to