File
Supported products
- Central CMS
- Central Forms
- Central Connect
Generate a file input field.
Basic usage
- Twig
- HTML
{{
form.file({
'label': 'Attach file',
'id': 'guid-' ~ random(),
'name': 'file-1'
})
}}
<div class="form__group">
<label for="guid-125910704" class="control__label">Attach file</label>
<div class="controls">
<input id="guid-125910704" name="file-1" type="file" class="form__control file" />
</div>
</div>
Helper options
You can configure this helper using the common helper options.