Last active
February 8, 2017 15:46
-
-
Save kjohnson/eed9157dc874605d81dd565f2cf080e4 to your computer and use it in GitHub Desktop.
Ninja Forms - reCaptcha Response Submission Data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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(); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Submission Data Documentation: http://developer.ninjaforms.com/codex/field-submission-data/