# charitable/1.4.9/includes/admin/views/settings/checkbox.php

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

- Page: https://pluginprobe.com/plugins/charitable/1.4.9/code/includes/admin/views/settings/checkbox.php
- Raw: https://pluginprobe.com/plugins/charitable/1.4.9/raw/includes/admin/views/settings/checkbox.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/includes/admin/views/settings/checkbox.php#L10-L20`.

```php
<?php
/**
 * Display checkbox field. 
 *
 * @author 	Studio 164a
 * @package Charitable/Admin View/Settings
 * @since 	1.0.0
 */

$value = charitable_get_option( $view_args[ 'key' ] );

if ( ! strlen( $value ) ) {
	$value = isset( $view_args['default'] ) ? $view_args['default'] : 0;
}

?>
<input type="checkbox" 
    id="<?php printf( 'charitable_settings_%s', implode( '_', $view_args[ 'key' ] ) ) ?>" 
    name="<?php printf( 'charitable_settings[%s]', $view_args[ 'name' ] ) ?>"
    class="<?php echo esc_attr( $view_args[ 'classes' ] ) ?>"
    <?php checked( $value ) ?> 
    <?php echo charitable_get_arbitrary_attributes( $view_args ) ?>/>
<?php if ( isset( $view_args['help'] ) ) : ?>
	<div class="charitable-help"><?php echo $view_args['help']  ?></div>
<?php endif;
```
