# charitable/1.4.9/templates/form-fields/file.php

Charitable – Donation &amp; Fundraising Platform (Donation Forms, Recurring Donations &amp; Fundraising Campaigns), version 1.4.9. 26 lines.

- Page: https://pluginprobe.com/plugins/charitable/1.4.9/code/templates/form-fields/file.php
- Raw: https://pluginprobe.com/plugins/charitable/1.4.9/raw/templates/form-fields/file.php
- Modified: 2017-01-18T06:07:00+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/charitable/1.4.9/code/templates/form-fields/file.php#L10-L20`.

```php
<?php
/**
 * The template used to display file form fields.
 *
 * @author 	Studio 164a
 * @since 	1.0.0
 * @version 1.0.0
 */

if ( ! isset( $view_args[ 'form' ] ) || ! isset( $view_args[ 'field' ] ) ) {
	return;
}

$form 			= $view_args[ 'form' ];
$field 			= $view_args[ 'field' ];
$classes 		= $view_args[ 'classes' ];
$value			= isset( $field[ 'value' ] ) ? $field[ 'value' ] : '';
?>
<div id="charitable_field_<?php echo $field[ 'key' ] ?>" class="<?php echo $classes ?>">	
	<?php if ( isset( $field[ 'label' ] ) ) : ?>
		<label for="charitable_field_<?php echo $field[ 'key' ] ?>">
			<?php echo $field[ 'label' ] ?>			
		</label>
	<?php endif ?>
	<input type="file" name="<?php echo $field[ 'key' ] ?>" value="<?php echo $value ?>" <?php echo charitable_get_arbitrary_attributes( $field ) ?>/>
</div>
```
