These are the partial Handlebars guys that we named input-field.
We are trying to dynamically create name and email fields based on the number of participants selected on the previous page.
<div class="form-group {{errors.fullName.class}}" id="fullName">
<label for="full-name">Your full name</label>
<p class="message-error">{{errors.fullName.message}}</p>
<input type="text" class="form-control" name="fullName" value="{{values.fullName}}">
</div>
We have some functions that create and display error messages if any of these form fields is blank.
Instead, {{errors.fullName.class}}we need it to be {{errors.fullName{{this}}.class}}.
We found that Handlebars does not allow reference to another handlebars variable inside the handlebars statement in this way.
Everything in every cycle:
{{
{{> input-field}}
{{/each}}
Does anyone have any idea how to achieve this effect, maybe by writing a helper function handlebars or some other way to do this concatenation.