Adds an FormControlInput object to this Form object. Default type is Text.
Chainable method.

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

@return	FormControlInput
185901
public function addInput($name, $attributes = array()) {

		$control = new FormControlInput($name, $attributes);
		$this->addControl($control);
		
		return $control;
		
	}
999330
public function renderControl($name) {

		// gets control object
		$control = $this->getControl($name);
		
		if ($control) {
			
			// adds common CSS classes to requested control
			if (count($this->controlClasses)) {
				$control->addClass(implode(' ', $this->controlClasses));
			}
			
			print $control->render();
			
		}
		
	}
1091156
public static function textAreaControlGroup($name, $value = '', $htmlOptions = array())
    {
        return self::controlGroup(self::INPUT_TYPE_TEXTAREA, $name, $value, $htmlOptions);
    }
133384
public function addInputText() : Input\Text
    {
        $input = new Input\Text($this->form, $this->name . '[]');
        $this->inputs[] = $input;

        return $input;
    }
196574
public function input($type, $name, $label = null, $value = null, array $options = [])
    {
        $label = $this->getLabelTitle($label, $name);

        $optionsField = $this->getFieldOptions(array_except($options, ['suffix', 'prefix']), $name);

        $inputElement = '';

         if(isset($options['prefix'])) {
            $inputElement = $options['prefix'];
        }

        $inputElement .= $type === 'password' ? $this->form->password($name, $optionsField) : $this->form->{$type}($name, $value, $optionsField);

         if(isset($options['suffix'])) {
            $inputElement .= $options['suffix'];
        }

         if(isset($options['prefix']) || isset($options['suffix'])) {
            $inputElement = '<div class="input-group">' . $inputElement . '</div>';
        }

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

        return $this->getFormGroup($name, $label, $wrapperElement);
    }
553375
public function setEditable($callback = NULL, \Nette\Forms\IControl $control = NULL)
    {
        $this->editable = TRUE;
        $this->setClientSideOptions();

        $callback && $this->setEditableCallback($callback);
        $control && $this->setEditableControl($control);

        return $this;
    }
324178
protected function resolveEditableField(FieldContract $control, array $editable = array())
    {
        $name = $control->get('name');
        if ($control->force_editable) {
            return $control;
        }
        $shouldBeEdited = false;
        foreach ($editable as $editableField) {
            if ($name == $editableField['name']) {
                $shouldBeEdited = true;
                break;
            }
        }
        $disable    = $shouldBeEdited ? [] : ['disabled' => 'disabled', 'readonly' => 'readonly'];
        $attributes = array_merge($control->get('attributes'), $disable);
        $control->attributes($attributes);
        return $control;
    }
589603
public function setControl($control)
    {
        $this->fieldName = null;

        $control = str_replace('.', '/', $control);

        $this->control = $control;

        return $this;
    }
388310
static function laraform($title, $name=null) {
        $el = new ElementButtonTwbs($name, ['value' => $title]);
        $el->addClass('btn');
        return $el;
    }
1171964
static function laraform($name, $attributes = null, array $data = []) {
        $el = new ElementSelect2Twbs($name);
        $el->addClass('js-larakit-select2 form-control');
        return $el;
    }
1301637
public function getEditableControl()
    {
        if ($this->editableControl === NULL) {
            $this->editableControl = new \Nette\Forms\Controls\TextInput;
            $this->editableControl->controlPrototype->class[] = 'form-control';
        }

        return $this->editableControl;
    }
581766
public void addControl(Control control) {
        if (controls == null) {
            controls = new FormData.Controls();
        }

        this.controls.add(control);
    }
390278
protected function _render_attributes()
    {

        // the string to be returned
        $attributes = '';

        // if
        if (

            // control has the "disabled" attribute set
            isset($this->attributes['disabled']) &&

            $this->attributes['disabled'] == 'disabled' &&

            // control is not a radio button
            $this->attributes['type'] != 'radio' &&

            // control is not a checkbox
            $this->attributes['type'] != 'checkbox'

        // add another class to the control
        ) $this->set_attributes(array('class' => 'disabled'), false);

        // iterates through the control's attributes
        foreach ($this->attributes as $attribute => $value)

            if (

                // if control has no private attributes or the attribute is not  a private attribute
                (!isset($this->private_attributes) || !in_array($attribute, $this->private_attributes)) &&

                // and control has no private javascript attributes or the attribute is not in a javascript private attribute
                (!isset($this->javascript_attributes) || !in_array($attribute, $this->javascript_attributes))

            )

                // add attribute => value pair to the return string
                $attributes .=

                    ($attributes != '' ? ' ' : '') . $attribute . '="' . preg_replace('/\"/', '&quot;', $value) . '"';

        // returns string
        return $attributes;

    }
135998
public function button($name, $value = null, $attributes = null)
    {
        return '<input type="button" name="'.$name.'" '.(($attributes !== null) ? $this->attributes($attributes) : "").' value="'.$this->getValue($name, $value).'" />';
    }
1270933
public function setControlSize(string $size)
    {
        $allowed_sizes = [
            'lg',
            'md',
            'sm',
            'xs'
        ];

        if (!in_array($size, $allowed_sizes)) {
            Throw new FormDesignerException(sprintf('Size "%s" is no valid controlsize. Allowed sizes are %s.', $size, implode(', ', $allowed_sizes)));
        }

        $this->control_size = $size;
    }
236502
public function add($name, $type = TextType::class, $args = [])
    {
        if ($this->getTypeClass($type) === RepeatedType::class || $type instanceof RepeatedType) {
            return $this->addRepeatedType($name, $type, $args);
        }

        $formControl = $this->getTypeObject($type, $args);

        if (!isset($args['name'])) {
            $formControl->setName($name);
        }

        if ($formControl->getLabel() === null) {
            $formControl->setLabel($formControl->getHumanName());
        }

        $this->getForm()->add($formControl);

        return $this;
    }
84754
static function button($name,$value='',$attrArray=null)
	{
		if(empty($attrArray['type'])) $attrArray['type'] = 'button';
	    $attrStr = self::input_attr($attrArray);
		return "<input name='{$name}' id='{$name}' value='{$value}' {$attrStr} />";
	}