meteormeteor-autoform

How to get the fieldValue in the Meteor AutoForm


By meteor autoform,

I can get the label by

{{> afFieldLabel name="myLabelName"}}

I can also automatically generate a input field by

{{> afFieldInput name="myLabelName"}}

What if I only want to show the value of the field? I expect there should be something like

{{> afFieldValue name="myLabelName" }}

Solution

  • This is late. I'm sure you already figured this out, but here you go anyway. This will get you the field name (reactively):

    var someValue = AutoForm.getFieldValue("fieldName" , "formId");

    Then you can place this value anywhere you like within your template.