# charitable/1.3.4/includes/admin/views/settings/donation-form-fields.php

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

- Page: https://pluginprobe.com/plugins/charitable/1.3.4/code/includes/admin/views/settings/donation-form-fields.php
- Raw: https://pluginprobe.com/plugins/charitable/1.3.4/raw/includes/admin/views/settings/donation-form-fields.php
- Modified: 2015-08-19T13:29:18+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.3.4/code/includes/admin/views/settings/donation-form-fields.php#L10-L20`.

```php
<?php 
/**
 * Display the donation form fields options.
 *
 * @author  Studio 164a
 * @package Charitable/Admin View/Settings
 * @since   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' ];
$options        = isset( $field[ 'options' ] )      ? $field[ 'options' ]       : array();
$value          = isset( $field[ 'value' ] )        ? (array) $field[ 'value' ] : array();
$placeholder    = isset( $field[ 'placeholder' ] )  ? $field[ 'placeholder' ]   : '';

if ( empty( $options ) ) {
    return;
}
?>
<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 ?>

    <ul class="options">

    <?php foreach ( $options as $val => $label ) : ?>

        <li>
            <input type="checkbox" name="<?php echo $field[ 'key' ] ?>[]" value="<?php echo $val ?>" <?php checked( in_array( $val, $value ) ) ?> />
            <?php echo $label ?>
        </li>

    <?php endforeach ?>

    </ul>
</div>
```
