I have a controller method that looks like the following:
@turbogears.expose(inputform=signup_form)
def signup_confirm(self, userId, firstName, lastName, email,
password):
if cherrypy.request.form_errors:
return self.signup()
...
The devcast says that the submit argument is removed from the form
parameters when passed via the inputform; hence there is no 'submit'
parameter to signup_confirm(). This works great, but only when there is
no validation errors. When there is errors, somehow the 'submit'
parameter is sent the second time (i.e. after showing the validation
errors, the user puts in valid data, clicks submit again). This causes
a 'unexpected keyword argument "submit"' error.
I suspect this is not the intended behaviour. I looked through the
validation code briefly but did not see an obvious answer.
Thanks,
Keir