September 2015
Intermediate to advanced
268 pages
5h 35m
English
The fifth feature of our customer registration form application is to capture the customer's interests. The interest categories are sports, news, movies, and comedy. We will capture the interests using checkboxes.
Let's start by creating the interests attribute in our customer model. This attribute will hold the values of the interests selected by the customer. This attribute will be an observable array as we need to allow the customer to select multiple interest categories. Add the following code to the customer model:
interests: ko.observableArray()
We will now update the view to add the checkboxes and bind them to the interests attribute. Add a fieldset element and interests section header, similar to the previous sections. ...
Read now
Unlock full access