meteor-jade icon indicating copy to clipboard operation
meteor-jade copied to clipboard

How to write autoForm properly in Jade?

Open rikyperdana opened this issue 7 years ago • 3 comments

{{#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?

rikyperdana avatar Feb 12 '17 07:02 rikyperdana

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'

gantrim avatar Apr 28 '17 18:04 gantrim

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

rikyperdana avatar Sep 11 '17 18:09 rikyperdana

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?

gantrim avatar Sep 13 '17 20:09 gantrim