viverae / marionette.formview

Marionette Form View, Easy Form Validation, Serialization and Submission
76 stars 16 forks source link

The view's model never gets updated #2

Open jsoverson opened 11 years ago

jsoverson commented 11 years ago

The created model or the one passed in never gets updated.

If I pass in a model with X number of attributes, but only have one field exposed in the form, serializeFormData only reports one field. While that is probably ok for the name of the method, there's no baked-in way for one to merge the form data with the original model.

Whether or not there should be a method is probably worth discussing. I could easily do:

this.model.set(this.serializeFormData());

In onSubmit or on blurs/other events, but it seems like something that should be available in the FormView.

iamchrismiller commented 11 years ago

Feel free to submit a PR. :)