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

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

- Page: https://pluginprobe.com/plugins/charitable/1.7.0.12/code/templates/form-fields/file.php
- Raw: https://pluginprobe.com/plugins/charitable/1.7.0.12/raw/templates/form-fields/file.php
- Modified: 2022-09-21T15:01:56+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.7.0.12/code/templates/form-fields/file.php#L10-L20`.

```php
<?php
/**
 * The template used to display file form fields.
 *
 * @author  WP Charitable LLC
 * @package Charitable/Templates/Form Fields
 * @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']; ?>_element">
			<?php echo $field['label']; ?>
		</label>
	<?php endif ?>
	<input type="file" name="<?php echo $field['key']; ?>" id="charitable_field_<?php echo $field['key']; ?>_element" value="<?php echo $value; ?>" <?php echo charitable_get_arbitrary_attributes( $field ); ?>/>
</div>

```
