Skip to content

Instantly share code, notes, and snippets.

@kjohnson
Last active May 27, 2016 15:24
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save kjohnson/5684f0dbbcc63ea19cfe9f5a74fe5ac7 to your computer and use it in GitHub Desktop.
var myCustomFieldController = Marionette.Object.extend({
fieldType: 'textbox',
initialize: function() {
Backbone.Radio.channel( this.fieldType ).reply( ‘get:submitData’, this.getSubmitData );
},
getSubmitData: function( fieldData ) {
fieldData.foo = 'bar';
return fieldData;
}
});
new myCustomFieldController();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment