mquandalle / meteor-jade

The Jade template engine for Meteor/Blaze
http://atmospherejs.com/mquandalle/jade
MIT License
307 stars 39 forks source link

How to write autoForm properly in Jade? #211

Open rikyperdana opened 7 years ago

rikyperdana commented 7 years ago
{{#autoForm collection="Posts" type="insert"}}
    {{> afQuickField name="title"}}
    {{> afQuickField name="picture"}}
    <button type="submit" class="btn btn-primary">Insert</button>
{{/autoForm}}

Inserting those codes directly in Jade only gives me App Crash error What should I do?

gantrim commented 7 years ago

Not sure if there is another way to do it, but here is what I do:

+autoForm collection="Posts" type="insert"
   +afQuickField name='title'
   +afQuickField name='picture'
rikyperdana commented 7 years ago

It's not working either. Is it really insert into database with those lines? Here is my packages list aldeed:autoform 5.8.1 aldeed:collection2 2.10.0

gantrim commented 7 years ago

Just checked my code. I've been using single quotes for the afQuickField Names, not sure if it makes a difference. It's been working for my enterprise app for about 3 years now. Is 'picture' a file type field? Can you copy and paste the specific error you are getting?