derickbailey/backbone.modelbinding — Issue #66: Overwrite model 2 form binding for a specific field to form 2 model
Author: RainerAtSpirit
Created: 2012-02-12 17:05:12+00:00
State: open

Looking at the source code
https://github.com/derickbailey/backbone.modelbinding/blob/master/backbone.modelbinding.js#L199

// set the default value on the form, from the model
var attr_value = model.get(attribute_name);
if (typeof attr_value !== "undefined" && attr_value !== null) {
element.val(attr_value);
} else {
var elVal = element.val();
if (elVal){
setModelValue(attribute_name, elVal);
}
}

it seems that the default direction of populating a form value is based on the model value if one is available.
Is there a way to reverse that direction for specific fields so that the value in the form takes precedence?

Thanks

Rainer