# hurrytimer/2.0.0/includes/Utils/Form.php

HurryTimer – An Scarcity and Urgency Countdown Timer for WordPress &amp; WooCommerce, version 2.0.0. 39 lines.

- Page: https://pluginprobe.com/plugins/hurrytimer/2.0.0/code/includes/Utils/Form.php
- Raw: https://pluginprobe.com/plugins/hurrytimer/2.0.0/raw/includes/Utils/Form.php
- Modified: 2019-04-05T20:43:02+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/hurrytimer/2.0.0/code/includes/Utils/Form.php#L10-L20`.

```php
<?php

namespace Hurrytimer\Utils;

class Form
{

    static function toggle($name, $value, $id)
    {
        ?>
        <input type="checkbox"
               name="<?php echo $name ?>"
               id="<?php echo $id ?>"
               class="js-hurrytimer-input-toggle"
               value="yes"
            <?php checked($value, 'yes') ?>
        />
        <?php
    }

    /**
     * @param $name
     * @param $value
     *
     * @return string
     */
    static function colorInput($name, $value)
    {
        ?>
        <span class="hurrytimer-color-preview"></span>
        <input
                type="text"
                name="<?php echo $name ?>"
                class="hurrytimer-color-input"
                value="<?php echo $value ?>" />
<!--        <span class="dashicons dashicons-no-alt hurrytimer-color-clear"></span>-->
        <?php
    }
}
```
