Crud, captcha, and formstyle

11 views
Skip to first unread message

Mark Abajian

unread,
May 29, 2014, 9:02:55 PM5/29/14
to
Hello web2py users,

Does anyone have a workaround or a fix for this potential bug?  It seems like crud is not handling captcha properly when formstyle is 'table2cols'.

2.9.5-stable+timestamp.2014.03.16.02.35.39
(Running on Apache/2.2.26 (Unix) mod_wsgi/3.3 Python/2.7.2 mod_ssl/2.2.26 OpenSSL/0.9.8y DAV/2, Python 2.7.2)

My browser: Safari 6.1.4 and Firefox 29.0.1 on Mac OS X 10.8.5.

In my app, I am using recaptcha, and specifically with crud.

When I set the formstyle for crud to 'table3cols' or 'divs' or 'ul' or 'bootstrap', then the captcha is rendered properly:  The label "Verify:" appears at the bottom of the form, and this is followed by the recaptcha input image.

But, when I set formstyle for crud to 'table2cols', then the captcha is not rendered properly:  The recaptcha input image appears at the top of the form (before all my other fields), and the "Verify:" label appears by itself at the bottom of the form.

If the captcha is entered incorrectly and the form submitted, then the "invalid" message comes up beneath the captcha image, as it is supposed to.  And mysteriously, now the entire "label, input, error" trio is correctly being rendered at the bottom of the form.

So, the anomaly with the image showing at the top of the form does not happen when recaptcha is responding to an invalid entry.  It happens only when there is no captcha error.

Does anyone have a workaround or patch for this?

Thank you, all.

Mark Abajian
Reply all
Reply to author
Forward
0 new messages