Capturing residential and postal addresses

The third feature of our customer registration form application is to capture the customer's residential and postal address. For residential address, we will capture the street address, city, post code, and country. For postal address, we will give users a choice between a PO Box and street address. The choice between a PO Box and street address will be captured using radio buttons, and the appropriate fields will be displayed. For PO Box address, we will capture the PO Box, city, post code, and country.

Let's start by creating the address attribute in our customer model. The address attribute will hold attributes for residential and postal addresses. Create the address and residential attributes. In our ...

Get KnockoutJS by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.