public function text($name, $value = null, $options = [], $label = null) { // Set up the attributes $options = $this->verifyAttributes('text', $options); // Create the default input $input = parent::text($name, $value, $options); return $this->createOutput($name, $label, $input); }
public function color($name, $value, $options = [], $label = null) { // Set up the attributes $options = $this->verifyAttributes('color', $options); $this->setColorRequirements(); // Create the default input $input = parent::text($name, $value, $options); $input = <<<HTML <div class="input-group"> <span class="input-group-addon" id="colorPreview{$name}" style="background-color: {$value};"> </span> {$input} </div> HTML; return $this->createOutput($name, $label, $input); }