Skip to content

Instantly share code, notes, and snippets.

@kjohnson
Last active February 8, 2017 15:46
Show Gist options
  • Select an option

  • Save kjohnson/eed9157dc874605d81dd565f2cf080e4 to your computer and use it in GitHub Desktop.

Select an option

Save kjohnson/eed9157dc874605d81dd565f2cf080e4 to your computer and use it in GitHub Desktop.
Ninja Forms - reCaptcha Response Submission Data
var myCustomFieldController = Marionette.Object.extend({
fieldType: 'recaptcha',
initialize: function() {
// See: http://developer.ninjaforms.com/codex/field-submission-data/
Backbone.Radio.channel( this.fieldType ).reply( ‘get:submitData’, this.getSubmitData );
},
getSubmitData: function( fieldData ) {
fieldData.response = grecaptcha.getResponse();
return fieldData;
}
});
new myCustomFieldController();
@kjohnson
Copy link
Author

kjohnson commented Feb 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment