hello everyone,
trying to understand why the pmsg below fails to pull the values of
the form ef. all i get is None for each of the three,
ef.vars.email_address, ef.vars.subject, and ef.vars.message_body. all
three are spelled correctly and the full form ef, displays all of the
proper information once the view is rendered.
def c_email():
msg = ""
pmsg = ""
response.subtitle = "Email Us"
ef = crud.create(db.email, onaccept=lambda ef: ef.vars.id)
if ef.process().accepted:
if ef.vars.id:
msg = ef.vars.id
ef = crud.read(db.email, msg) #ef changes here
msg = str(msg)+" Your message was accepted and sent. Thank
you for your interest in IQa."
pmsg = P("reply_to: ", ef.vars.email_address, ", subject:
", ef.vars.subject, ", message: ", ef.vars.message_body)
return dict(message=msg, email_form=ef, post_message=pmsg)