Output one of the options checkboxes.

@param string $name
@param string $on
@param string $label
@return string
192400
private function option_checkbox($name, $on, $label) {
        if ($on) {
            $checked = ' checked="checked"';
        } else {
            $checked = '';
        }
        $name = 'userselector_' . $name;
        // For the benefit of brain-dead IE, the id must be different from the name of the hidden form field above.
        // It seems that document.getElementById('frog') in IE will return and element with name="frog".
        $output = '<div class="form-check"><input type="hidden" name="' . $name . '" value="0" />' .
                    '<label class="form-check-label" for="' . $name . 'id">' .
                        '<input class="form-check-input" type="checkbox" id="' . $name . 'id" name="' . $name .
                            '" value="1"' . $checked . ' /> ' . $label .
                    "</label>
                   </div>\n";
        user_preference_allow_ajax_update($name, PARAM_BOOL);
        return $output;
    }
128608
public function label($name, $label, array $attr = null)
    {
        return $this->input($name, [ 'type' => 'label', 'label' => $label, 'attr' => $attr ]);
    }
380929
public function addTextarea($name, $label = '', $is_mandatory = true )
    {
        $e = new \FrenchFrogs\Form\Element\Textarea($name, $label);
        $this->addElement($e);

        if ($is_mandatory) {
            $e->addRule('required');
        } else {
            $e->addFilter('nullable');
        }

        return $e;
    }
66416
public function addSelectRemote($name, $label = '', $url = '#', $length = 1, $is_mandatory = true)
    {
        $e = new \FrenchFrogs\Form\Element\SelectRemote($name, $label, $url, $length);
        $this->addElement($e);

        if ($is_mandatory) {
            $e->addRule('required');
        } else {
            $e->addFilter('nullable');
        }

        return $e;
    }
366530
public static function checkboxList($name, $selection = null, $items = [], $options = [])
    {
        if (!isset($options['item'])) {
            $itemOptions = ArrayHelper::remove($options, 'itemOptions', []);
            $encode = ArrayHelper::getValue($options, 'encode', true);
            $options['item'] = function ($index, $label, $name, $checked, $value) use ($itemOptions, $encode) {
                $options = array_merge([
                    'label' => $encode ? static::encode($label) : $label,
                    'value' => $value
                ], $itemOptions);
                return '<div class="checkbox">' . Html::checkbox($name, $checked, $options) . '</div>';
            };
        }

        return parent::checkboxList($name, $selection, $items, $options);
    }
259684
public function radio($name, $label = null, $value = null, $checked = null, array $options = [])
    {
        $inputElement = $this->radioElement($name, $label, $value, $checked, false, $options);

        $wrapperOptions = $this->isHorizontal() ? ['class' => implode(' ', [$this->getLeftColumnOffsetClass(), $this->getRightColumnClass()])] : [];
        $wrapperElement = '<div' . $this->html->attributes($wrapperOptions) . '>' . $inputElement . '</div>';

        return $this->getFormGroup(null, $label, $wrapperElement);
    }
621842
public function set_options($name,$options){
		if (is_array($options)){
			$str="";
			foreach($options as $k => $v)
				$str.="<item value='".$this->xmlentities($k)."' label='".$this->xmlentities($v)."' />";
			$options=$str;
		}
		$this->options[$name]=$options;
	}
530879
public function addButton($name, $label = '%s', $link = '#', $binds = [], $attr = [] )
    {
        $c = new Column\Button($name, $label, $link, $binds, $attr);
        $c->setOptionAsDefault();
        $this->addColumn($c);

        return $c;
    }
365898
protected static function createCheckBoxAndRadioButtonLabel($label, $input, $htmlOptions)
    {
        list ($hidden, $input) = self::normalizeCheckBoxAndRadio($input);
        return $hidden . ($label !== false
            ? self::tag('label', $htmlOptions, $input . ' ' . $label)
            : $input);
    }
1025007
protected function formatOption($name, $value, $label)
    {
        return '<option value="'.$value.'"'
                    .(isset($this->filters[$name]) && strpos($this->filters[$name], $value) === 0 ? ' selected' : '')
                .'>'.(isset($label) ? $label : $value).'</option>';
    }
1278762
public function checkboxGroup($name, $options, $selected = null, $htmlOptions = [], $template = '<input><label>', $separator = '<br />')
    {
        if (is_null($selected)) {
            $selected = $this->getArrayValue($_POST, $name);
            if (is_null($selected)) {
                $selected = $this->getArrayValue($_GET, $name);
            }
        }
        $r = array();
        foreach ($options as $value => $label) {
            $r[] = $this->checkbox($name . '[]', $label, $value, is_array($selected) ? in_array($value, $selected) : $selected == $value, $htmlOptions, $template);
        }
        return implode($separator, $r);
    }
1068155
private static function select_option($label, $value, array $selected) {
        $attributes = array();
        $value = (string)$value;
        if (in_array($value, $selected, true)) {
            $attributes['selected'] = 'selected';
        }
        $attributes['value'] = $value;
        return self::tag('option', $label, $attributes);
    }
1359230
public static function make($name, $label = '')
    {
        return parent::make($name, $label)->separator(',')->options(
            Options::make()->append('', 1)
        );
    }
820139
static function laraform($name = '', $options, $is_inline = true) {
        $gr = new ElementGroupCheckboxTwbs($name);
        if ($is_inline) {
            $gr->setIsInline(true);
        }
        foreach ($options as $k => $v) {
            $gr->putCheckboxTwbs($k, $k)
                ->setLabel($v);
        }
        return $gr;
    }
371500
public function addRemoteBoolean($name, $label = '', $function = null)
    {
        $c = new Column\RemoteBoolean($name, $label, $function);
        $this->addColumn($c);

        return $c;
    }
476950
public function addLink($name, $label = '', $attr = [] )
    {
        $e = new \FrenchFrogs\Form\Element\Link($name, $label, $attr);
        $this->addElement($e);
        return $e;
    }
800044
public function addButton($name, $label, $attr = [] )
    {
        $e = new \FrenchFrogs\Form\Element\Button($name, $label, $attr);
        $this->addElement($e);
        return $e;
    }