Aldeed autoform doesn't work

Hey guys I’ve some problems with aldeed autoform: essentialy it doesn’t work at all. I mean that when I restart the page it’s blank if I have autoform or quick form declared in the code.

This is my code: I want to collect data and store them in my collection.

Here there is the account collector page with the form call:

<template name="account">

    {{> pageHeading title='Account Details' }}
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            {{> insertDoctorForm}}
        </div>
    </div>
</template>
<template name="insertDoctorForm">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-lg-12">
                <div class="text-center m-t-lg">
                    <div class="row">
                        <div class="ibox" style="text-align:left">
                              {{> quickForm collection="Doctors" id="insertDoctorForm" type="insert"}}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

here there is the collection:

Doctors = new Mongo.Collection('doctors');

DoctorSchema = new SimpleSchema({
   firstName: {
    type: String,
    label: "First Name"
  },
  lastName: {
    type: String,
    label: "Last Name"
  },
  personNumber: {
    type: String,
    label: "Person Number"
  },
  phone: {
    type: String,
    optional: true
  },
  address: {
    type: Object
  },
  'address.street': {
    type: String
  },
  'address.city': {
    type: String
  },
  'address.state': {
    type: String,
  },
  'address.postalCode': {
    type: String,
    label: "ZIP"
  }
}, { tracker: Tracker });

Doctors.attachSchema(DoctorSchema);

My package file is this:

less
iron:router
twbs:bootstrap@3.3.5
fortawesome:fontawesome
zimme:iron-router-active
jquery
okgrow:router-autoscroll


meteor-base
mobile-experience
mongo
blaze-html-templates
session
tracker
logging
reload
random
ejson
spacebars
check
standard-minifier-css
standard-minifier-js
accounts-password
reactive-dict

aldeed:autoform
aldeed:simple-schema
aldeed:collection2

Can you help me?

What errors do you have in the browser console?

Sorry for the late response.
This is what I have in the console:

iron_core.js:84 pathFor couldn't find a route named "campaigns"
Iron.utils.warn @ iron_core.js:84
meteor.js:930 Exception in template helper: TypeError: Cannot read property 'mergedSchema' of undefined
    at Object.quickFormContext (http://localhost:3000/packages/aldeed_autoform.js?hash=673fd03a414910ae3107b77299fb0cf1671616c7:6855:39)
    at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:2994:16
    at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:1653:16
    at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3046:66
    at Function.Template._withTemplateInstanceFunc (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3687:12)
    at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3045:27
    at Object.Spacebars.call (http://localhost:3000/packages/spacebars.js?hash=65db8b6a8e3fca189b416de702967b1cb83d57d5:172:18)
    at http://localhost:3000/packages/aldeed_autoform.js?hash=673fd03a414910ae3107b77299fb0cf1671616c7:6811:23
    at wrappedArgFunc (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:2903:14)
    at Blaze.View.<anonymous> (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:2616:26)

Exception from Tracker recompute function:
meteor.js:930 TypeError: Cannot read property 'id' of null
    at Blaze.View.<anonymous> (aldeed_autoform.js:6689)
    at blaze.js:1875
    at Function.Template._withTemplateInstanceFunc (blaze.js:3687)
    at blaze.js:1873
    at Object.Blaze._withCurrentView (blaze.js:2214)
    at viewAutorun (blaze.js:1872)
    at Tracker.Computation._compute (tracker.js:351)
    at new Tracker.Computation (tracker.js:239)
    at Object.Tracker.autorun (tracker.js:616)
    at Blaze.View.autorun (blaze.js:1885)

There you have it, your code crashes. Check your route definitions.

2 Likes