If I have a simple schema:
Schemas.User = new SimpleSchema({
emails: {
type: [Object],
optional: true
},
"emails.$.address": {
type: String,
regEx: SimpleSchema.RegEx.Email
},
"emails.$.verified": {
type: Boolean
},
"emails.$.description": {
type: String
},
"emails.$.provider": {
type: String
},
...
});
If I use autoform
to print a form, I can use
{{> afQuickField name="emails"}}
to print a box in which I can add new or remove/update existing emails to the user. I like the option to add/remove objects but the design is quite ugly. I want the rows in a table instead, so I have to replace the template with a custom template.
How can I do this? I guess this is the template currently being used https://github.com/aldeed/meteor-autoform/blob/devel/templates/bootstrap3/components/afArrayField/afArrayField.html but instead of having each object in the array as a list group item, I need them to be table rows with each field in each column.
How should the template be customized and how can I swap the templates used?