Integrating recaptcha into page submit

I'm using recaptcha for the 1st time and having difficulty understanding exactly how to integrate it into my form. I have a form with a submit button. I've added a Configuration entity ( reCaptcha ) with an association to my form. Now, I have my own original submit button (which executes a microflow) as well as the reCaptcha widget/submit button, which runs Test_OnClick microflow. How do I combine the functionality to execute the reCaptcha then run my submit microflow if reCaptcha was a success, otherwise show a message? I also have a Cancel button on the form. Ideally I will be able to show just a Submit and Cancel button to the user on the same line. Thanks! Tracy
1 answers


From the documentation the on click microflow is run when the recaptcha submit is successful. You can set the on click microflow to perform the action that you would otherwise trigger with your submit/save button in the control bar of the form. The cancel button is not part of the widget, but you could create a new button inside the form that performs the cancel function. Then with some layout/styling place the button next to the submit button of the recaptcha widget and remove the standard cancel button and have the form not showing the control bar.