Vegas CMF Form Elements

Vegas\Forms\Element\Colorpicker

Colorpicker is input field element with Bootstrap Colorpicker included. Chosen color is saved as hex string (example: '#000000' for black).

All required js and css files are included in vegas library. Check installation guide for more details.

Configuration

namespace Foo\Forms;

use Vegas\Forms\Element\Colorpicker;

class Bar extends \Vegas\Forms\Form
{
    public function initialize()
    {
        $background = new Colorpicker('background');
        $background->setAssetsManager($this->assets);
        $this->add($background);

        // ...
    }
}