javascript - How to add JS array to Meteor autoform entry -


i using meteor 1.1.0 , aldeed:autoform , need put values string array generated in template's js file document entry of type [string] during (or before) submit. how can that?

the solution add before: hook in autoform.hooks insert: function in it, modify document entries ( work parameter must defined in schema ). example:

autoform.hooks({     'add-form': {         before:{             insert:function(doc){                 doc.fileid = '1234; // doc data form.                  return doc; // .fileid element try modify             }         }       } }); 

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -