September 2015
Intermediate to advanced
268 pages
5h 35m
English
The second feature of our customer registration form application is to capture the customers contact details. We will capture the phone number and e-mail address of the customer. We will also ask for the customer's preferred contact. The phone number and the e-mail will be captured using input text fields and the preferred contact will be captured using radio buttons.
Let's start by adding attributes for the phone number and e-mail fields to our customer model. Add an attribute to group the fields; we will call it contactDetails. Now add the attributes for phone number and e-mail under contactDetails. Our model should now look similar to this:
/* the model */ var customer = { personalInfo: { title: ko.observable(), firstName: ...Read now
Unlock full access