Creates a submit button.

@param $label
@param null $name
@return $this
197557
public function submit( $caption = null )
    {
        $el = $this->element( 'button', null, 'submit'  )
            ->css( 'btn waves-effect waves-light' )
            ->content( null !== $caption ? "{$caption}<i class=\"material-icons right\">send</i>" : '' );
        return $el;
    }
1131819
public function addGroup($label = null)
    {
        if (!is_array($label)) {
            $label = ['label' => $label];
        } elseif (isset($label[0])) {
            $label['label'] = $label[0];
            unset($label[0]);
        }

        $label['form'] = $this->form;

        return $this->add(new static($label));
    }
700071
public function key($name, $label = null)
    {
        $this->lastKey = $name;

        // Rest previous key's last rule
        $this->lastRule = null;

        if (!isset($this->options['rules'][$name])) {
            $this->options['rules'][$name] = [];
        }

        if (isset($label)) {
            $this->label($label);
        }

        return $this;
    }
20815
public function withTextFromOptions(string $name, string $label, array $valueLabelMap)
    {
        $this->contentGroup->textAreas[$name] = ['name' => $name, 'label' => $label, 'options' => $valueLabelMap, 'order' => $this->order++];

        return $this;
    }
1195765
public function addNumber($name, $label = '', $is_mandatory = true)
    {
        $e = new \FrenchFrogs\Form\Element\Number($name, $label);
        $this->addElement($e);

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

        return $e;
    }
1233474
public function withFile(string $name, string $label, array $allowedExtensions = null)
    {
        $this->contentGroup->fileAreas[$name] = ['name' => $name, 'label' => $label, 'allowed_extensions' => $allowedExtensions, 'order' => $this->order++];

        return $this;
    }
283053
final protected function textarea($name, $label = null, $data = []) {return $this->field(
		$name, Textarea::class, $label, $data
	);}
961941
function setLabel($label)
    {
        // normalize header label
        $label = str_replace(' ', '-', ucwords(str_replace(['_', '-'], ' ', (string) $label)));

        if (! isValidLabel($label) )
            throw new \InvalidArgumentException(sprintf(
                'Invalid header name "%s".'
                , is_null($label) ? 'null' : $label
            ));


        $this->label = $label;
        return $this;
    }
476950
public function addLink($name, $label = '', $attr = [] )
    {
        $e = new \FrenchFrogs\Form\Element\Link($name, $label, $attr);
        $this->addElement($e);
        return $e;
    }
157600
public function setLabel(string $label = null): ButtonInterface
    {
        if ($this->isVisibility()) {
            $this->label = $label;
        }

        return $this;
    }
1331144
public function open($id, $label = null) {
        return $this->webService->post("SELECT FROM 'PUSH'.'DOCUMENT'", array_filter([
            "id" => $id,
            "label" => $label
        ]));
    }
77318
public function add_terminal($name, $label, $callback = null)
    {
        if ($label === null || $callback === null) {
            unset($this->terminal_labels[$name], $this->terminals[$name]);
        } elseif (!in_array($label, $this->terminal_labels)) {
            $this->terminals[$name] = $callback;
            $this->terminal_labels[$name] = $label;
            asort($this->terminal_labels);
        }

        return $this;
    }
1246695
final protected function text($name, $label = null, $data = []) {return $this->field(
		$name, Text::class, $label, $data
	);}
1180212
public static function button($label = 'button', $htmlOptions = array())
    {
        $htmlOptions = ArrayHelper::defaultValue('name', \CHtml::ID_PREFIX . \CHtml::$count++, $htmlOptions);
        Html::clientChange('click', $htmlOptions);
        return static::btn('button', $label, $htmlOptions);
    }
881978
public function textarea($name, $label, $attr = array())
    {
        return $this->input(
            $name,
            $label,
            array_merge(
                $attr,
                array('type' => 'textarea')
            )
        );
    }
552380
public function createLink($label, $href = null)
    {
        if ( ! $this->attributes->hasAttributeClass('lead')) {
            $this->attributes->addAttributeClass('lead');
        }

        $link = new Link($label, $href);
        $link->attributes->addAttributeClass(['btn', 'btn-primary', 'btn-lg']);
        $this->childNodes->push($link);

        return $this->childNodes->last();
    }
24327
public function createItem($label = null, $href = null)
    {
        $link = new Link($label, $href);
        $link->attributes->addAttributeClass('dropdown-item');

        $this->childNodes->push($link);

        return $this->childNodes->last();
    }