How to customize Submit action/event in Kentico Biz Forms

Manmath Kulkarni asked on August 14, 2017 10:26

Hi All,

I am using Kentico 10 for my site and I want to check Google recaptcha validation on my Submit button of built in biz form. I have check this https://devnet.kentico.com/forums/f45/t19283/bizform-submit-button but link mentioned in this answer is not working.

Kindly let me know how can this be handled.

Thanks in advance,
Manmath

Recent Answers


Trevor Fayas answered on August 14, 2017 14:03

the options are:

  1. clone and modify the recaptcha so you can execute your custom logic in the captcha's various events (such as the IsValid method). this is probably the one you want to use if you are trying to determine if it's valid or not.
  2. clone and overwrite the bizform web part so you can attach you custom logic and try to get the form value before submit.
  3. add a global event hook to the biz form in submit so you can retrieve the form info before submission and cancel the event if invalid.

out of curiosity what version of recaptcha are you trying to get to work? The human checkbox thing or the normal enter the random letters/numbers

1 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on August 14, 2017 19:32

The validation is already done with Google as to whether or not the data entered on the recaptcha is correct or not, so why do you need to re-verify it? Are you wanting to add additional verification in your form after submit?

0 votesVote for this answer Mark as a Correct answer

Daniele Lombardo answered on August 15, 2017 23:19

I also need to modify the submit button for Kentico forms. However cloning the biz-form web part and looking in the code behind doesn't show the submit method. Where is the submit method located?

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on August 16, 2017 16:30

It would be the viewBiz.OnAfterSave event hook (if you're on kentico 10).

1 votesVote for this answer Mark as a Correct answer

Manmath Kulkarni answered on August 16, 2017 16:52

Hi Brenden/Trevor,

Thanks for your reply. I want to validate if captcha response is valid before submitting form data.

Is there any way to do this. I am using Googles new "I am not robot" captcha

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on August 16, 2017 16:58

The "I'm not a robot" captcha (checkbox) will validate once the box is checked. So it will be validated prior to the form being submitted. Secondly, if the form is submitted and the captcha has been invalidated or is invalid, the form submission will fail. So no need to perform any further validation as this is already done for you.

Have you looked at the New Recaptcha project code at all? I say download the code and read the documentation and make modifications as you see fit in the project code.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.