javascript - Insert/update object array with meteor-autoform -


i have

schema.user = new simpleschema({   fullname: {     type: string,   },   contracts: {     type: [object],   },   "contracts.$.start_date": {     type: date,   },   "contracts.$.end_date": {     type: date,   },   "contracts.$.salary": {     type: number,   } });  meteor.users.attachschema(schema.user); 

not want display form in template, making possible update name , add/remove/update contracts.

i have tried

{{> quickform collection="meteor.users" id="updateusercontractsform" type="update" doc=this fields="fullname,contracts"}} 

but can update fullname. if trying add new contracts, wont saved. guess it's because have type="update" instead of type="insert", wont allow me insert edit contracts since don't exist yet.

am right? can mix insert/update?


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -