Skip to content

Instantly share code, notes, and snippets.

@metasansana
Created February 1, 2015 03:24
Show Gist options
  • Save metasansana/415f46133ab6efe87913 to your computer and use it in GitHub Desktop.
Save metasansana/415f46133ab6efe87913 to your computer and use it in GitHub Desktop.
module.exports = {
name: 'patientForm',
controls: [{
type: 'text',
name: 'name[first]',
label: {
id: 'name[first]',
name: 'Name'
},
'ng-model': 'model.name.first',
placeholder: 'First'
}, {
type: 'text',
name: 'name[last]',
'ng-model': 'model.name.last',
placeholder: 'Last'
}, {
type: 'date',
name: 'dob',
label: {
id: 'dob',
name: 'Date of Birth'
},
'ng-model': 'model.dob',
'ng-class': '{\'has-error\': datepickerForm.date.$invalid}'
}, {
type: 'select',
name: 'sex',
'ng-model': 'model.sex',
label: {
id: 'sex',
name: 'Sex'
},
'ng-init': 'sexSelect = [{label:\'Male\', value:\'M\'},{label:\'Female\',' +
'value:\'F\'},{label:\'Other\', value:\'O\'}]'
}, {
type: 'text',
name: 'address[street1]',
label: {
id: 'address[street1]',
name: 'Street1'
},
'ng-model': 'model.address.street1',
}, {
type: 'text',
name: 'address[street2]',
label: {
id: 'address[street2]',
name: 'Street2'
},
'ng-model': 'model.address.street2',
}, {
type: 'text',
name: 'address[town]',
label: {
id: 'address[town]',
name: 'Town'
},
'ng-model': 'model.address.town',
}, {
type: 'text',
name: 'address[code]',
label: {
id: 'address[code]',
name: 'Postal Code'
},
'ng-model': 'model.address.code',
}, {
type: 'text',
name: 'address[country]',
label: {
id: 'address[country]',
name: 'Country'
},
'ng-model': 'model.address.country',
}, {
type: 'text',
name: 'phone[home]',
placeholder: 'Home',
'ng-model': 'model.phone.home',
}, {
type: 'text',
name: 'phone[mobile]',
placeholder: 'Mobile',
'ng-model': 'model.phone.mobile',
}, {
type: 'text',
name: 'phone[other]',
placeholder: 'Other',
'ng-model': 'model.phone.other',
}, {
type: 'text',
name: 'fax',
label: {
id: 'fax',
name: 'Fax'
},
'ng-model': 'model.fax',
}, {
type: 'email',
name: 'email',
label: {
id: 'email',
name: 'Email'
},
'ng-model': 'model.email',
}, {
type: 'text',
name: 'other[name][first]',
'ng-model': 'model.other.name.first',
}, {
type: 'text',
name: 'other[name][second]',
'ng-model': 'model.other.name.second',
}, {
type: 'text',
name: 'other[relationship]',
'ng-model': 'model.other.relationship',
}, {
type: 'text',
name: 'other[phone]',
'ng-model': 'model.phone',
}, {
type: 'text',
name: 'other[email]',
'ng-model': 'model.email',
}
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment