Closed impatient closed 9 years ago
Definitely needs investigation. Internalizing this sample code:
<form id="me">
<input name="gender" type="radio" value="MALE">M </input>
<input name="gender" type="radio" value="FEMALE">F </input>
<input name="relief" type="text" value=""/>
</form>
var m = new Backbone.Model({gender:'MALE', relief:'ee'});
var BindingView = Backbone.Epoxy.View.extend({
el: '#me',
bindings : {
'input[name="gender"]': 'checked:gender',
'input[name="relief"]': 'value:relief'
},
initialize: function(){
this.listenTo(this.model, 'change', function() {
console.log(this.model.toJSON());
console.log(this.$(':checked').val());
});
}
});
var b = new BindingView({model:m});
Should be set. Thanks @bragradon.
Radio button name=gender with two radios (MALE/FEMALE) not updating model.
Using current prod release
http://jsfiddle.net/P8r4v/5/