knockout.js blank model for form
===

So frustrating

I have a jQuery jqGrid with rows of data.

A knockout.js viewModel which has an observable rowSelected(false).

The grid has onSelectRow handler to update the veiwModel property rowSelected. When this is updated it enables a button 'Edit' which, when clicked, calls a viewModel method - edit - which populates data in the viewModel from the selected row and displays a form with all the data-bind input elements correctly populated.

I have  Save method on the model - works fine.

A Cancel form method on the model works fine.

I have an Add method which, if I had not previously selected a table row and clicked edit, just gives a blank form - great!

If I had previously selected a row the viewModel would have data from the row and when I  click Add, the form shows the data from the row.

I want Add to create a viewModel with no data in it for the form.

I wanted to use jsFiddle to show this but the site has been failing for the last 2 hours at least.

Any thoughts? 

What I want is to open a form with blank inputs.

Thanks


