I want to change the output of the standard file upload field with something similar to "Whipping File Inputs Into Shape with Bootstrap 3". I am using the following conditional in my Solspace Freeform Pro composer template in an attempt to change the output for file upload field types:
{composer:fields}
{if composer:field_output}
{if 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:elseif composer:field_type == 'file'}
<span class="btn btn-default btn-file">
Browse {composer:field_output}
</span>
{if:else}
{composer:field_output}
{/if}
{/if}
{/composer:fields}
The if:elseif field type "file" statement doesn't seem to work in the template and has no effect in the output when the form is rendered:
{if:elseif composer:field_type == "file"}
<span class="btn btn-default btn-file">
Browse {composer:field_output}
</span>
{if:else}
....
To check if there is something wrong with my statement, I changed "file" to "text". The conditional then worked and wrapped all text inputs in the <span>
mark-up. So the conditional statement itself appears to work correctly - just not for field_type "file" though.
If there some special statement/conditional that I'm missing to be able to control the output of field_type = "file"?
Version Info:
ExpressionEngine: 2.10.1
Freeform Pro: 4.2.3