Closed evanglerm closed 8 years ago
What have you in Data? Options need format:
var options = [{label: 'label1', value: 'value1'},{label: 'label2', value: 'value2'}];
What is your version of autoform?
I am using "aldeed:autoform 4.2.2" . Due to certin dependencies I am not able to upgrade to higher version.
Data = new Mongo.Collection("data");
// I have tried it with following as well
Registers = new Mongo.Collection("registers");
I have also taken you simple example which return static options but even that gives the same error.
fixed
Still getting same error. LIttle bit out of this issue. I am generating Schema dynamically. I can see those Autoforms as well dynamically. I want to add Autosuggest and tried "mizzao/meteor-autocomplete". That works ok except for the thing that it needs "template: Template.userPill". Since my stuff is dynamic, if you can give clue/hint/help in creating template like
<template name="userPill">
<span class="label">{{*I want to give Autoform Property while creating the Schema Dynamically*}}</span>
</template>
In short I want to create HTML Template from scratch in JS, which is available for rendering when I load my Autoform page. Appreciate any clue/hint/help.
Coming back to the issue here are the details.
debug.js:41 TypeError: AutoForm.getCurrentDataForForm is not a function
at null.<anonymous> (universe-autoform-select.js:125)
at template.js:116
at Function.Template._withTemplateInstanceFunc (template.js:457)
at fireCallbacks (template.js:112)
at null.<anonymous> (template.js:205)
at view.js:107
at Object.Blaze._withCurrentView (view.js:538)
at view.js:106
at Object.Tracker._runFlush (tracker.js:497)
at onGlobalMessage (setimmediate.js:102)
var options = function () {
return options = [{label: 'label1', value: 'value1'},{label: 'label2', value: 'value2'}];;
};
Please try now with version 0.1.18
I does create dropdown but up-down arrow keys are not working. Not sure if it is because I am trying with Autoform-Ionic combination. That is the package which doesnt allow me to upgrade to Autoform5 as well.
arrow keys are not implemented yet: https://github.com/vazco/meteor-universe-autoform-select/issues/19
I get Exception in template helper: TypeError: AutoForm.getCurrentDataForForm is not a function.
I have defined Schema as follow.