Here it is: http://pastebin.com/2zMNYWnX
On 06/27/2012 05:20 PM, Richard Vézina wrote:
Would you show you SQLFORM.factory code? Richard On Wed, Jun 27, 2012 at 4:14 PM, [email protected] <mailto:[email protected]> <[email protected] <mailto:[email protected]>> wrote: Hi guys. I'm facing a problem I didn't find a pure web2py solution. I have a SQLFORM.factory() with some fields, including one captcha field. Every time the form is showed, the input captcha field must be empty. The form may have error in other fields and the captcha could be filled right, but a new one is generated every time the form is showed. As password fields, the captcha must be always presented empty to the user. So, I tried to do form.vars.captcha = '' just before my return dict(form=form), but the value user filled in keeps showing. I also tried playing with form.request_vars.captcha but unsuccessfull again. I found a workaround hardcoding the <INPUT> tag in my view, instead of {{=form.custom.widget.captcha}__} as I usually do with other fields. Does anybody has any suggestion about it? How to change a form.vars.field value after validation? I think a custom validator would solve my problem. But I think it shouldn't be necessary in a so simple cenario. -- Vinicius Assef

