Issue #3 resolved

PFW does not accept existing records

Stoyan Shopov
created an issue

Hi Bruno, I found another issue for you: PWF does not seem to notice when an existing record is passed in as a parameter. It accepts the record correctly but does not display any of its values in the form. To replicate the issue add the following 2 lines to your sample program:

{{{

!python

record = db.person(db.person.id == 1) #needs to match an existing record form = PowerFormWizard(db.person, record=record, steps=mysteps, options=options, submit_button=T('Send')) }}}

I changed line 160 in plugin_PowerFormWizard.py from: {{{

!python

form = SQLFORM(self.table, formstyle=self.formstyle, **attributes) }}} to
{{{

!python

form = SQLFORM(self.table, record=self.record, formstyle=self.formstyle, **attributes) }}} and it seemed to do the job.

Cheers, Stoyan.

Comments (3)

  1. Log in to comment