当Recaptcha是Invalid + App Engine Python时,如何保留表单数据字段

时间:2022-11-10 23:15:17

I've read this article, Using reCAPTCHA with Google App Engine, it wasn't very clear on how to keep the form data when the Recaptcha is invalid.

我已经阅读了这篇文章,将ReCAPTCHA与Google App Engine一起使用,当Recaptcha无效时,如何保留表单数据并不是很清楚。

I've rough idea how to make this work through AJAX. But, is there a simpler solution ? As I don't really need AJAX as for registration. All I need is to allow user to reenter the captcha for invalid attempt, and retain the form data that user has entered.

我已经大致了解如何通过AJAX实现这项工作。但是,有一个更简单的解决方案吗?因为我不需要AJAX注册。我只需要允许用户重新输入验证码以进行无效尝试,并保留用户输入的表单数据。

Any advice ?

任何建议?

2 个解决方案

#1


0  

Send the received form data back to the form and set the form field values. WTForms can help you with validation and error messages.

将收到的表单数据发送回表单并设置表单字段值。 WTForms可以帮助您验证和错误消息。

#2


0  

Since there is no simpler way/suggestions of doing this, I'm going to solve this using AJAX solutions.

由于没有更简单的方法/建议这样做,我将使用AJAX解决方案来解决这个问题。

#1


0  

Send the received form data back to the form and set the form field values. WTForms can help you with validation and error messages.

将收到的表单数据发送回表单并设置表单字段值。 WTForms可以帮助您验证和错误消息。

#2


0  

Since there is no simpler way/suggestions of doing this, I'm going to solve this using AJAX solutions.

由于没有更简单的方法/建议这样做,我将使用AJAX解决方案来解决这个问题。