I assume that's not the complete code, as your function doesn't return
anything. Does it end with something like:
return dict(form=form, ...)
And are you using a generic view (i.e., have you defined a contactus.html
view)? If you use a generic view and pass a dictionary with more than one
item to the generic view, you'll get a table with the dictionary keys in
the first column and the values in the second. It looks like that's what
you've got.
Anthony
On Tuesday, August 7, 2012 4:33:14 PM UTC-4, Rob_McC wrote:
>
> I'm sure it is easy, but I couldn't figure it out.
>
> *Q:*
> *How do you remove the*
> *form :*
> *from the table generated with FORM() helper.*
> *
> *
> See red box on screen shot.
>
> *Reason*:
> I'm building a tutorial on how to do a simple Email form in web2py.
>
> Thanks!
> ~Rob
>
> def contactus():
> form=FORM(TABLE(TR("Your name:",INPUT(_type="text",_name="s_name",
> requires=IS_NOT_EMPTY())),
> TR("Your email:",INPUT(_type="text",_name="s_email",
> requires=IS_EMAIL())),
> TR("Subject:",INPUT(_type="text",_name="s_subject",
> requires=IS_NOT_EMPTY())),
> TR("Message",TEXTAREA(_name="s_message", requires=
> IS_NOT_EMPTY())),
> TR("",INPUT(_type="submit",_value="SUBMIT"))))
>
>
--