You are probably getting an error because the auth function is disabled or the mailer is not set and form=auth() is returning an empty string. You can avoid the error with a simple test:
def user(): form=auth() if form: submit = form.element("input",_type="submit") submit["_type"] = "image" submit["_src"] = URL(...) return dict(form=form) On Jan 10, 10:02 am, "mr.freeze" <nat...@freezable.com> wrote: > It works for me. Here is my user function: > > def user(): > form=auth() > submit = form.element("input",_type="submit") > submit["_type"] = "image" > submit["_src"] = URL(...) > return dict(form=form) > > On Jan 10, 3:11 am, Frank <thethinkbo...@gmail.com> wrote: > > > thanks ,mr.freeze, > > the method you provide request customized form with SQLFORM.factory. > > what about the default auth form just like login, register, password forms? > > those forms use {{=form}}. can we still use method "form.element" to change > > submit button to image button? I try it but failed. > > > by the way, how to internationatinalize the change password form? I can do > > it by > > using T method for other forms, but can not translate the change password > > form. > > I'm sure there should be better way. > > > Frank > >
-- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@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.