For example on product management page, I want to subscribe category:
ProductCol.attachSchema(new SimpleSchema({
title: {
type: String,
label: orion.helpers.getTranslation('ProductCol.schema.title') // We use this function to make i18n work in autoform
},
mpn:{
type:String,
label:"manufacture product number"
},
category:{
type:[String],
label: "sub category",
autoform: {
options: function () {
Meteor.subscribe("categoriesList");
var results=CateCol.find({}).fetch();
var re=[];
for(var i=0; i<results.length;i++){
var tmp={'label':results[i].label,'value':results[i].value}
re.push(tmp);
}
console.log(re);
return re;
}
}
},
....
The CateCol catch empty list. I already publish the Catecol manually at the server side.
can you give me an example how to make the dynamic select option(category) on backend product management?
For example on product management page, I want to subscribe category:
The CateCol catch empty list. I already publish the Catecol manually at the server side. can you give me an example how to make the dynamic select option(category) on backend product management?