Returns form elements.

@return mixed
424007
public function getForm()
    {
        $elementString = '';

        if (isset($this->attributes[self::$formHolder[self::$formName]])) {
            $elementString .= $this->attributes[self::$formHolder[self::$formName]][self::$formName];
        }

        $elementString .= $this->getHtmlElements();

        $close = null;
        $close = self::$formHolder[self::$formName].'_close';

        if (isset($this->attributes[$close])) {
            $elementString .= $this->attributes[$close];
        }

        return $this->element[self::$formHolder[self::$formName]] = $elementString;
    }
129649
public function getHtmlAttributes()
    {
        if ( $this->getValue()) {
            $this->_attributes['checked'] = 'checked';
        }
        $text = parent::getHtmlAttributes();
        $text = str_replace('form-control', '', $text);
        return $text;
    }
127197
protected function getInput() {

        $class       = $this->element['class'] ? ' ' . (string)$this->element['class'] : '';
        $trueLabel   = $this->element['trueLabel'] ? (string)$this->element['trueLabel'] : 'APP_GLOBAL_YES';
        $falseLabel   = $this->element['falseLabel'] ? (string)$this->element['falseLabel'] : 'APP_GLOBAL_NO';
        $buttonClass = $this->element['buttonClass'] ? ' ' . (string)$this->element['buttonClass'] : '';
        $readonly = isset($this->element['readonly']) ? (bool)$this->element['readonly'] : false;

        $checked1 = '';
        $active1  = '';
        $checked0 = '';
        $active0  = '';

        if (isset($this->value)) {

            $value    = (bool)$this->value;
            $checked1 = $value ? ' checked="checked"' : '';
            $active1  = $value ? ' active' : '';
            $checked0 = !$value ? ' checked="checked"' : '';
            $active0  = !$value ? ' active' : '';

        }

        $html = "";

        if ($readonly) {

            $html .= '<input type="hidden" name="' . $this->name . '" value="' . $this->value . '">';

            if (empty($checked0)) {
                $html .= $this->getText()->translate($trueLabel);
            } else {
                $html .= $this->getText()->translate($falseLabel);
            }

        } else {

            $html .= '<div class="btn-group' . $class . '" data-toggle="buttons">
  <label class="btn' . $buttonClass . $active1 . '">
    <input type="radio" name="' . $this->name . '" id="' . $this->id . '1"' . $checked1 . ' value="1"> ' . $this->getText()->translate($trueLabel) . '
  </label>
  <label class="btn' . $buttonClass . $active0 . '">
    <input type="radio" name="' . $this->name . '" id="' . $this->id . '0"' . $checked0 . ' value="0"> ' . $this->getText()->translate($falseLabel) . '
  </label>
</div>';

        }

        return $html;

    }
1182666
public function getTupleElements()
	{
		if ( $this->tupleElements === null )
		{
			$this->tupleElements = array_filter( $this->elementIndex, function( $item ) { return $item['substitutionGroup'] === XBRL_Constants::$xbrliTuple; } );
		}

		return $this->tupleElements;
	}
845237
public function getElementTypes()
    {
        $types = array();

        foreach ($this->elements as $key => $element) {
            $types[$key] = get_class($element);
        }

        return $types;
    }
1252826
public function getFormElements(&$form, &$data)
    {
        $element = $form->createElement('multiCheckbox', 'format');
        $element->setLabel($this->_('Excel options'))
                ->setMultiOptions(array(
                    'formatVariable'=> $this->_('Export labels instead of field names'),
                    'formatAnswer'  => $this->_('Format answers'),
                    'formatDate'    => $this->_('Format dates as Excel numbers easily convertable to date')
                ))
                ->setBelongsTo($this->getName())
                ->setSeparator('');
        $elements['format'] = $element;

        return $elements;
    }
1152394
protected function getFormValues() {
    $input = array();
    foreach ($this->getInputParameters() as $parameter) {
      if (isset($_POST[$parameter['name']])) {
        $input[$parameter['name']] = $_POST[$parameter['name']];
      }
    }
    return $input;
  }
128375
protected function getFormData()
    {
        $data = array();
        $inputTagNames = array('input', 'textarea', 'select');
        $skipNames = array('ext', 'form');

        /** @var DOMElement $element */
        $element = $this->xml->getElementsByTagName('form')->item(0);
        $elements = $element->getElementsByTagName('*');

        for ($i = 0; $i < $elements->length; $i++)
        {
            $element = $elements->item($i);

            $isElement = $element->nodeType == XML_ELEMENT_NODE;
            $isInputTag = $isElement && in_array($element->nodeName, $inputTagNames);

            if ($isInputTag)
            {
                $name = $element->getAttribute('name');
                if (in_array($name, $skipNames))
                {
                    continue;
                }
                if ($name)
                {
                    if ($element->getAttribute('type') == 'file')
                    {
                        $data[$name]['file'] = $_FILES[$name];
                    }
                    else
                    {
                        $data[$name]['data'] = arg($name);
                    }
                    $data[$name]['label'] = $this->getLabelAttr($element);
                    if (!$data[$name]['label'])
                    {
                        $data[$name]['label'] = $name;
                    }

                    switch ($element->nodeName)
                    {
                        case 'input':
                            switch ($element->getAttribute('type'))
                            {
                                case 'checkbox':
                                    $data[$name]['data'] = $data[$name]['data'] ? strYes : strNo;
                                    break;
                            }
                            break;
                    }
                }
            }
        }

        return $data;
    }
971263
public function getTypes()
    {
        $types = array();

        $typeStrings = $this->soapClient->__getTypes();
        foreach ($typeStrings as $typeString) {
            $type = new TypeNode($typeString);
            $element = $this->findTypeElement($type->getName());
            if (!empty($element)) {
                $type->setElement($this->document, $element);
            }

            $types[] = $type;
        }

        return $types;
    }
89946
public function render(): string
    {
        $formCode = '<form>';

        foreach ($this->elements as $element) {
            $formCode .= $element->render();
        }

        $formCode .= '</form>';

        return $formCode;
    }
810382
protected function _getSelectForm()
    {
        $form = new \Gems_Form(array('name' => 'autosubmit', 'class' => 'form-inline', 'role' => 'form'));

        $form->setHtml('div');
        $div = $form->getHtml();
        $div->class = 'search';

        $span = $div->div(array('class' => 'panel panel-default'))->div(array('class' => 'inputgroup panel-body'));

        $element = $form->createElement('select', 'gpa_level', array(
            'multiOptions' => $this->patchLevels,
            'onchange' => 'this.form.submit();',
            'onkeyup' => 'this.form.submit();',
            ));

        $element->setValue($this->getPatchLevel());
        $span->input($element);

        $form->addElement($element);

        $submit = $form->createElement('submit', 'search', array(
            'label' => $this->_('Search'),
            'class' => 'button small',
            ));

        $span->input($submit);
        $form->addElement($submit);

        return $form;
    }
450637
public function getFilteredValues()
    {
        $values = [];

        foreach($this->getElements() as $name => $e){
            /** @var \FrenchFrogs\Form\Element\Element $e */
            if ($e->isDiscreet()) {continue;}
            $values[$name] = $e->getFilteredValue();
        }
        return $values;
    }
281432
protected function getInput()
	{
		// Initialize some field attributes.
		$rows = (int) $this->element['rows'];
		$cols = (int) $this->element['cols'];
		$height = ((string) $this->element['height']) ? (string) $this->element['height'] : '250';
		$width = ((string) $this->element['width']) ? (string) $this->element['width'] : '100%';
		$assetField = $this->element['asset_field'] ? (string) $this->element['asset_field'] : 'asset_id';
		$authorField = $this->element['created_by_field'] ? (string) $this->element['created_by_field'] : 'created_by';
		$asset = $this->form->getValue($assetField) ? $this->form->getValue($assetField) : (string) $this->element['asset_id'];

		// Build the buttons array.
		$buttons = (string) $this->element['buttons'];

		if ($buttons == 'true' || $buttons == 'yes' || $buttons == '1')
		{
			$buttons = true;
		}
		elseif ($buttons == 'false' || $buttons == 'no' || $buttons == '0')
		{
			$buttons = false;
		}
		else
		{
			$buttons = explode(',', $buttons);
		}

		$hide = ((string) $this->element['hide']) ? explode(',', (string) $this->element['hide']) : array();

		// Get an editor object.
		$editor = $this->getEditor();

		return $editor->display(
			$this->name, htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8'), $width, $height, $cols, $rows,
			$buttons ? (is_array($buttons) ? array_merge($buttons, $hide) : $hide) : false, $this->id, $asset,
			$this->form->getValue($authorField)
		);
	}
1307049
public function getData()
    {
        $properties = $this->formProperties;

        foreach ($properties as $index => $property) {
            if ($this->doesExist() && $property['uri'] == 'http://www.tao.lu/Ontologies/generis.rdf#login') {
                $properties[$index]['widget'] = 'http://www.tao.lu/datatypes/WidgetDefinitions.rdf#Readonly';
                break;
            }
        }

        if ($this->doesExist()) {
            foreach ($properties as $key => $property) {
                if ($property['uri'] == GenerisRdf::PROPERTY_USER_PASSWORD && isset($property['value'])) {
                    $properties[$key]['value'] = '';
                    break;
                }
            }
        }

        return [
            self::PROPERTIES => $properties,
            self::RANGES => $this->ranges,
        ];
    }
229439
public function getElements() {

        $elements = array();
        foreach ($this->modules as $module) {
            if (!$this->trusted && !$module->safe) continue;
            foreach ($module->info as $name => $v) {
                if (isset($elements[$name])) continue;
                $elements[$name] = $this->getElement($name);
            }
        }

        // remove dud elements, this happens when an element that
        // appeared to be safe actually wasn't
        foreach ($elements as $n => $v) {
            if ($v === false) unset($elements[$n]);
        }

        return $elements;

    }
780099
protected function getInput()
	{
		// Initialize some field attributes.
		$class = $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : '';
		$disabled = ((string) $this->element['disabled'] == 'true') ? ' disabled="disabled"' : '';
		$columns = $this->element['cols'] ? ' cols="' . (int) $this->element['cols'] . '"' : '';
		$rows = $this->element['rows'] ? ' rows="' . (int) $this->element['rows'] . '"' : '';

		// Initialize JavaScript field attributes.
		$onchange = $this->element['onchange'] ? ' onchange="' . (string) $this->element['onchange'] . '"' : '';

		return '<textarea name="' . $this->name . '" id="' . $this->id . '"' . $columns . $rows . $class . $disabled . $onchange . '>'
			. htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') . '</textarea>';
	}
812448
protected function getAllActions()
    {
        $fields = $this->form->Fields()->dataFields();
        $actions = $this->form->Actions()->dataFields();

        $fieldsAndActions = array_merge($fields, $actions);
        $actions = array_filter($fieldsAndActions, function ($fieldOrAction) {
            return $fieldOrAction instanceof FormAction;
        });

        return $actions;
    }