I would like to show inline errors on my composer form in Freeform. I tried the template code mentioned at https://expressionengine.stackexchange.com/a/25346/961 which is:
<p>
{composer:field_output}
{!-- composer:field_name will parse first to the field's name --}
{if freeform:error:{composer:field_name}}
<strong>{freeform:error:{composer:field_name}}</strong>
{/if}
</p>
but it's giving me the error:
You have an invalid conditional in your template. Please review your conditionals for an unclosed string, invalid operators, a missing }, or a missing {/if}.
Parser State: Unexpected ‘:’ (MISC); expected RD in on line 28.
If I remove the inline error code then it works ok but obviously doesn't show the inline errors.
The full composer template is as follows:
<div class="ff_composer">
{composer:page}
{composer:rows}
<div class="line">
{composer:columns}
<div class="unit size1of{composer:column_total}">
{if composer:field_total == 0}
{/if}
{composer:fields}
{if composer:field_label}
{if composer:field_type == 'nonfield_captcha'}
{if freeform:captcha}
<p>
<strong>{composer:field_label}</strong>
</p>
{/if}
{if:else}
<label class="field_label" {if composer:field_name != ''}for="freeform_{composer:field_name}"{/if}>
{composer:field_label}{if composer:field_required}<span class="required_item">*</span>{/if}
</label>
{/if}
{/if}
{if composer:field_output}
{if composer:field_type == 'nonfield_title'}
<h2>{composer:field_output}</h2>
{if:elseif composer:field_type == 'nonfield_paragraph'}
{composer:field_output}
{if:elseif composer:field_type == 'nonfield_captcha'}
{if freeform:captcha}
{freeform:captcha}<br />
<input type="text" name="captcha" value="" size="20" maxlength="20" style="width:140px;" />
{/if}
{if:else}
<p>
{composer:field_output}
{!-- composer:field_name will parse first to the field's name --}
{if freeform:error:{composer:field_name}}
<strong>{freeform:error:{composer:field_name}}</strong>
{/if}
</p>
{/if}
{/if}
{/composer:fields}
</div>
{/composer:columns}
</div>
{/composer:rows}
{/composer:page}
</div>
composer:fields
variable pair like :{composer:fields} {/composer:fields}