Diving into the spine
library you can see that configure()
will overrule any previous configuration. It sets the className
and attributes
and clears the current records which were stored in the model.
I don't think that you would want this in any case. It would simply define another model, which sounds like the thing you want to do. A model shouldn't change on the fly.
If you are trying to use forms to set different fields on a model, you can simply use a configuration with all fields and apply the forms on the model.
class ExampleModel extends Spine.Model
@configure "ModelName", "field1", "field2"
And a simple form like this
<form>
<input type="text" name="field1"/>
</form>
Now you could take the values from this form and store it in your model.
modelInstance = ExampleModel.fromForm($('form'))
This would just store the field1
attribute on your new model instance.
A little more details on the use-case would be nice.
This might help: Forms documentation