About the asterisks in col3, you have to use your form's field names
as in:
col3=dict(initialen='*', naam='*', ...)

On Apr 24, 5:49 am, jmverm...@xs4all.nl wrote:
> Denes,
>
> > Strictly speaking only reset is valid HTML.
> > But you can create any button you want.
> > How? it depends on what do you want to do with it.
> > In your case, what is "Cancel" going to do?.
> > To add a reset button:
> > form[0].append(TR(TD(),TD(INPUT(_type="reset",_value="Reset form")))
> > form[0] is the table that defines the layout in the standard SQLFORM.
>
> The code above added a button beneath the submit button, to add the
> reset- and cancel button to the right of the submit button I used the
> following code (it took me some time to figure this out, if there is a
> neater way to code this, please let me know) :
>
> submit_tr=form.element(_id='submit_record__row')
> submit_tr[1].append(INPUT(_type='reset',_value='Reset'))
> submit_tr[1].append(INPUT(_type='button',_value='Cancel'))
>
form[0][-1][1].append(INPUT(_type='reset',_value='Reset'))
form[0][-1][1].append(INPUT(_type='button',_value='Cancel'))

explanation:
form[0] = table
form[0][-1] = table's last row
form[0][-1][1] = table's last row second box (where the submit button
sits)

> The reset button works. The cancel button should redirect the visitor
> to the page he came from, this is not in every case the same page. I
> guess I need to add an _onclick attribute ...?

Yes, onclick works.
>
> Furthermore, when the visitor clicks the submit button, I would like
> the form to be mailed to a mail address, how do I code that?

See this recent thread:
http://groups.google.com/group/web2py/browse_thread/thread/ec7d941c8d9f1fd1/4d1a35ad7f569233#4d1a35ad7f569233
>
> Kind regards,
> Annet.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to