Autoform and FlowRouter with template level subscriptions within Meteor.js

125 views Asked by At

I can't seem to work out how to create a working Autoform "QuickForm" while using FlowRouter. I keep getting this error:

Exception in template helper: Error: Footer is not in the window scope

This is my Quickform. In this case collection equals a string value of "Footer":

{{> quickForm id="formView" type="insert" collection=form.collection }}

Perhaps a Quickform, simpleSchema and FlowRouter example will suffice to answer this question.

1

There are 1 answers

0
Jammer On

I realised my issue was that the file that created the collection and the template file that rendered the Quickform were in separate packages!

I added api.export("Footer",['client', 'server']); to the correct package and all worked fine!

Note: I don't yet know if this is the recommend method or if there are security issues with this solution so will not mark this as correct just yet.