diff --git a/assets/js/src/public.js b/assets/js/src/public.js index 0635a7ae0c..71eb44c75c 100644 --- a/assets/js/src/public.js +++ b/assets/js/src/public.js @@ -36,7 +36,12 @@ function ( // eslint-disable-line func-names // non ajax post request return true; } - // ajax request + + if (formData['g-recaptcha-response']) { + formData.data.recaptcha = formData['g-recaptcha-response']; + } + + // ajax request MailPoet.Ajax.post({ url: window.MailPoetForm.ajax_url, token: formData.token, diff --git a/views/form/iframe.html b/views/form/iframe.html index 9cbed9470e..17ee7675fb 100644 --- a/views/form/iframe.html +++ b/views/form/iframe.html @@ -22,4 +22,4 @@ var MailPoetForm = <%= json_encode(mailpoet_form) %>; - \ No newline at end of file +