Adds an FormControlTextarea object to this Form object. Chainable method.

@param	string	Control name.
@param	array	List of attributes.

@return	FormControlTextarea
542175
public function addTextarea($name, $attributes = array()) {
	
		$control = new FormControlTextarea($name, $attributes);
		$this->addControl($control);
	
		return $control;
	
	}
635075
public function formField($title = null, $name = null, $hasEmpty = false, $value = "", $emptyString = null)
    {

        if (!$title) {
            $title = $this->name;
        }
        if (!$name) {
            $name = $this->name;
        }

        $field = new CheckboxSetField($name, $title, $this->enumValues($hasEmpty), $value);

        return $field;
    }
91656
public function setEditableControl(\Nette\Forms\IControl $control)
    {
        $this->isEditable() ?: $this->setEditable();
        $this->editableControl = $control;

        return $this;
    }
1020487
public void removeControl(String name) {
        Widget control = findChildByName(name);
        if (control != null) {
            removeChild(control);
            if (mBgResId != -1) {
                updateMesh();
            }
        }
    }
969580
public static function dateFieldControlGroup($name, $value = '', $htmlOptions = array())
    {
        return self::controlGroup(self::INPUT_TYPE_DATE, $name, $value, $htmlOptions);
    }
57353
public CMAEditorInterface addControl(Control control) {
    if (controls == null) {
      controls = new ArrayList<Control>();
    }

    controls.add(control);
    return this;
  }
1065008
public static function controls($controls, $htmlOptions = array())
    {
        if (TbArray::popValue('row', $htmlOptions, false)) {
            self::addCssClass('row', $htmlOptions);
        }
        $before = TbArray::popValue('before', $htmlOptions, '');
        $after = TbArray::popValue('after', $htmlOptions, '');
        if (is_array($controls)) {
            $controls = implode('', $controls);
        }
        $content = $before . $controls . $after;
        return self::tag('div', $htmlOptions, $content);
    }
1244609
public static function customControlGroup($input, $name, $htmlOptions = array())
    {
        $htmlOptions['input'] = $input;
        return self::controlGroup(self::INPUT_TYPE_CUSTOM, $name, '', $htmlOptions);
    }
1072206
public function open(String $name = NULL, Array $_attributes = [])
    {
        $this->clearValidationSessions();

        $this->setFormName($name, $_attributes);

        $this->isEnctypeAttribute($_attributes);
       
        $this->isWhereAttribute($name);
        
        $this->isQueryAttribute();

        $this->isPreventAttribute();
        
        $this->setMethodType($_attributes);
        
        $this->createFormElementByAttributes($_attributes, $return);

        $this->isDatabaseProcessWithName($name, $return);

        $this->isCSRFAttribute($return);

        $this->_unsetopen();

        $this->outputElement .= $return;

        return $this;
    }
838679
public function addSelectList(string $name, array $items = []): void
    {
        $options = $this->formOptions['fields'][$name];
        $wrapper = $this->createWrapper();
        $label = '';

        if (isset($options['label']['text'])) {
            $label = $this->createLabel($options['label']['text'], $name);

            unset($options['label']['text']);
        }

        $list = HtmlTag::createElement('select')
            ->set('id', $name)
            ->set('name', $name);

        $caption = '';

        if (isset($options['caption']['text'])) {
            $list->set('aria-describedby', $name . '_caption');
            $caption = $this->createCaption($options['caption']['text'], $name);

            unset($options['caption']['text']);
        }

        foreach ($items as $value => $text) {
            $item[] = $list->addElement('option')
                ->set('value', $value)
                ->text($text);
        }

        $elements = [
            'wrapper' => $wrapper,
            'label'   => $label,
            'list'    => $list,
            'item'    => $item ?? [],
            'caption' => $caption
        ];

        foreach ($elements as $name => $element) {
            $$name = $this->assignOptionsToElement($options, $name, $element);
        }

        $wrapper->addElement($label);
        $wrapper->addElement($list);
        $wrapper->addElement($caption);

        echo $wrapper;
    }
719910
public function getControlByName($name, $type = null)
    {
        foreach ($this->controls as $control) {
            if ($type !== null) {
                if ($control instanceof $type && $control->getName() === $name) {
                    return $control;
                }
            } else {
                if ($control->getName() === $name) {
                    return $control;
                }
            }
        }

        return null;
    }
853587
public function addFormField(string $name): void
    {
        $options = $this->formOptions['fields'][$name];
        $wrapper = $this->createWrapper();
        $label = '';

        if (isset($options['label']['text'])) {
            $label = $this->createLabel($options['label']['text'], $name);

            unset($options['label']['text']);
        }

        $input = HtmlTag::createElement('input')
            ->set('type', $options['input']['type'] ?? 'text')
            ->set('id', $name)
            ->set('name', $name);

        $caption = '';

        if (isset($options['caption']['text'])) {
            $input->set('aria-describedby', $name . '_caption');
            $caption = $this->createCaption($options['caption']['text'], $name);

            unset($options['caption']['text']);
        }

        $elements = [
            'wrapper' => $wrapper,
            'label'   => $label,
            'input'   => $input,
            'caption' => $caption
        ];

        foreach ($elements as $name => $element) {
            $$name = $this->assignOptionsToElement($options, $name, $element);
        }

        if (in_array($options['input']['type'] ?? 'text', ['checkbox', 'radio', 'file'])) {
            $wrapper->addElement($input);
            $wrapper->addElement($label);
        } else {
            $wrapper->addElement($label);
            $wrapper->addElement($input);
        }

        $wrapper->addElement($caption);

        echo $wrapper;
    }
942134
private static function buildWrapper($field, $name, $label = '', $checkbox = false, $required)
        {
            $getter = 'get' . Inflector::camelize($name);
            $error = null;
            $actual = Session::instance('ThinForm')->getActual();

            if (null !== $actual) {
                $error = $actual->getErrors()->$getter();
            }

            $class = 'control-group';

            if (!empty(static::$controlGroupError) && !empty($error)) {
                $class .= ' ' . static::$controlGroupError;
            }

            $id = ' id="control-group-' . $name . '"';
            $out = '<div class="' . $class . '"' . $id . '>';
            $out .= static::buildLabel($name, $label, $required);
            $out .= '<div class="controls">' . PHP_EOL;
            $out .= ($checkbox === true) ? '<label class="checkbox">' : '';
            $out .= $field;

            if (!empty($error)) {
                $out .= '<span class="help-inline">' . $error . '</span>';
            }

            $out .= ($checkbox === true) ? '</label>' : '';
            $out .= '</div>';
            $out .= '</div>' . PHP_EOL;

            return $out;
        }
1037861
public function open(string $formName, array $attributes = []) : FormInterface
    {
        self::$formName = $formName;
        self::$formHolder[$formName] = $formName;
        self::$formOpen = true;
        $this->form($formName, $attributes);

        return $this;
    }
388310
static function laraform($title, $name=null) {
        $el = new ElementButtonTwbs($name, ['value' => $title]);
        $el->addClass('btn');
        return $el;
    }
550331
public function RenderControl () {
		$attrsStr = $this->renderControlAttrsWithFieldVars([
			'autoComplete',
		]);
		if (!$this->form->GetFormTagRenderingStatus()) 
			$attrsStr .= (strlen($attrsStr) > 0 ? ' ' : '')
				. 'form="' . $this->form->GetId() . '"';
		$formViewClass = $this->form->GetViewClass();
		return $formViewClass::Format(static::$templates->control, [
			'id'		=> $this->id,
			'name'		=> $this->name,
			'type'		=> $this->type,
			'value'		=> htmlspecialchars($this->value, ENT_QUOTES),
			'attrs'		=> strlen($attrsStr) > 0 ? ' ' . $attrsStr : '',
		]);
	}
57618
public function getControl($name) {
		
		if (substr($name, -2) == '[]') {
			$name = substr($name, 0, -2);
		}
		
		if ($this->controlExists($name)) {
			return $this->controls[$name];
		} else {
			$log = Logger::getInstance();
			$log->addError('Field control “' . $name . '” has not been defined in Form object'); 
			return NULL;
		}
		
	}