Reputation: 5254
I'm using a package called AutoForm.
{{> afQuickField name="propertyInfo.zipcode" placeholder="XXXXX" class="form-control track-order-change"}}
It basically renders a label and input element.
I have a session variable:
Session.set("zipcode", //something dynamic);
I have a registered helper:
Handlebars.registerHelper("zipcode", function(){
return Session.get("zipcode");
})
I would like something like this to work:
{{> afQuickField name="propertyInfo.zipcode" value="{{zipcode}}" placeholder="XXXXX" class="form-control track-order-change"}}
Upvotes: 0
Views: 61
Reputation: 652
First fix you global helper to read:
Template.registerHelper("zipcodeHelper", function(){
return Session.get("zipcode");
})
Then fix the afQuickField a little:
{{> afQuickField value=zipcodeHelper class="form-control track-order-change"}}
Refer to this GH issue: https://github.com/aldeed/meteor-autoform/issues/210
Upvotes: 1