0

What is the best solution for protection frontend form of spam, before insert data in database, random addition two number or any captcha?

Any simple solution?

user_odoo
  • 2,284
  • 34
  • 55
  • If you can share more about what form handling processes you are employing I can provide more detailed information. – Phillip Stack Mar 29 '17 at 14:11
  • HI, @user_odoo you can use Google Recaptcha before Posting the values. I have added such validations for a registration form on frontend – Hilar AK Mar 30 '17 at 06:29

1 Answers1

2

I am not sure how you are setting up your form however you should be able to do client side validation and server side validation. If the client side validation is not passed then Do not let the user submit.

Client side validation should always be followed by server side validation. In your controller or whatever process you are using to handle your form submission you can validate the data again. Use regular expression to validate phone numbers, email addresses, names whatever you wish to validate. Check that all required fields in fact contain data etc.

HTML5 FORM VALIDATION

Regular expression phone validation

Community
  • 1
  • 1
Phillip Stack
  • 3,308
  • 1
  • 15
  • 24
  • Hi, I want that only human user can populate form on my frontend page and on bootom before click on Submit button add captcha or any other tools. – user_odoo Mar 29 '17 at 14:41
  • I have not implemented a captcha myself. However there are millions of them so my guess is that there is probably lots of code you can borrow to make it happen. Heres a howto I located. https://www.thesitewizard.com/general/add-captcha-to-feedback-form-script.shtml – Phillip Stack Mar 29 '17 at 14:43
  • https://www.sitepoint.com/community/t/adding-captcha-to-a-preexisting-contact-form/27914 – Phillip Stack Mar 29 '17 at 14:44
  • A lot of this seems to be in PHP so you will need to port that to QWEB and python for Odoo. – Phillip Stack Mar 29 '17 at 14:44