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

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

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

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

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

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

$min = isset( $view_args['min'] ) ? 'min="' . $view_args['min'] . '"' : '';
$max = isset( $view_args['max'] ) ? 'max="' . $view_args['max'] . '"' : '';
?>
<input type="number" 
    id="<?php printf( 'charitable_settings_%s', implode( '_', $view_args[ 'key' ] ) ) ?>" 
    name="<?php printf( 'charitable_settings[%s]', $view_args[ 'name' ] ) ?>"
    value="<?php echo $value ?>" <?php echo $min ?> <?php echo $max ?> 
    class="<?php echo esc_attr( $view_args[ 'classes' ] ) ?>"
    <?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;
```
