Returns the form element as an HTML tag

@return string
182128
public function outputElement() : string
    {
        $attributes = [];
        foreach ($this->attributes as $name => $value) {
            if ('value' === $name) {
                $value = $this->getValue();
            }
            $attributes[] = $name . '="' . $value . '"';
        }
        return '<input ' . implode(' ', $attributes) . ' />';
    }
504915
public function html() {
    if (($el = $this->getElement()) === NULL) return NULL;
    
    return implode('',xml::export($el->childNodes));
  }
547024
public static function dom(){
        $attr = self::$attr;
        $id = self::$attr['id'];

        $attr['placeholder'] = $attr['placeholder'] ? $attr['placeholder'] : $attr['label'];

        $attr['readonly'] = ($attr['readonly'] == '1') ? 'readonly' : '';

        $dom = <<<EOT
            <div class="layui-form-item" component-name="{$attr['component_name']}">
                <label class="layui-form-label">{$attr['label']}</label>
                <div class="layui-input-{$attr['display']}">
                    <input id="{$id}"  lay-verify="{$attr['layVerify']}" class="layui-input {$attr['component_name']} {$attr['classname']}" value="{$attr['value']}" name="{$attr['name']}" placeholder="{$attr['placeholder']}" {$attr['readonly']}>
                </div>
                <div class="layui-form-mid layui-word-aux">{$attr['helpinfo']}</div>
            </div>
EOT;

        return $dom;
    }
471709
public function __toHtml()
    {
        return $this->toHtml($submitted = false, $blnSimpleLayout = false, $blnLabel = true, $blnDisplayError = true);
    }
1218612
private function getHtmlBeginning()
	{
		$html = '<' . $this->tagName;

		foreach ($this->attributes as $name => $value) {
			$html .= ' ' . $name . '="' . htmlspecialchars($value) . '"';
		}

		return $html;
	}
19054
public function toString()
    {
        $string = '';
        if (!empty($this->tag)) {
            $string .=  '<' . $this->tag;
            $string .= $this->attributesToString();
            if ($this->autoclosed) {
                $string .= '/>';
            } else {
                $string .= '>' . $this->contentToString() . '</' . $this->tag . '>';
            }
        } else {
            $string .= $this->text;
            $string .= $this->contentToString();
        }
        return $string;
    }
966582
public function getHTML()
    {
        $details = $this->getHTMLDetails();
        extract($details);
        
        $options = null;
        foreach ($this['options'] as $optValue => $optText) {
            $options .= "<option value='{$optValue}'"
                . (($this['value'] == $optValue)
                    ? " selected=\"selected\""
                    : null)
                . ">{$optText}</option>\n";
        }

        return <<<EOD
<p>
<label for='$id'>$label</label>$brAfterLabel
<select id='$id'{$class}{$name}{$autofocus}{$required}{$readonly}{$checked}{$title}>
{$options}
</select>
{$messages}
</p>
<p class='cf-desc'>{$description}</p>
EOD;
    }
846530
protected function get_element_markup() {
		$select_markup = "<select {$this->get_id_and_class_markup()}>";
		$value         = $this->get_value();

		foreach ( $this->option_values as $option_value => $display ) {
			$select_markup .= '<option value="' . \esc_attr( $option_value ) . '" ' . \selected( $value, $option_value, false ) . '>' . \esc_html( $display ) . '</option>';
		}
		$select_markup .= '</select>';

		return $select_markup;
	}
1049832
public function getTag() {
		if($this->exists()) {
			$url = $this->getURL();
			$title = ($this->Title) ? $this->Title : $this->Filename;
			if($this->Title) {
				$title = Convert::raw2att($this->Title);
			} else {
				if(preg_match("/([^\/]*)\.[a-zA-Z0-9]{1,6}$/", $title, $matches)) {
					$title = Convert::raw2att($matches[1]);
				}
			}
			return "<img src=\"$url\" alt=\"$title\" ".$this->getAttributesHTML()." />";
		}
	}
1250005
function toHTML()
    {

        return '<div class="captcha-container"><img src="' . $this->form_properties['assets_url'] . 'process.php?captcha=' . ($this->form_properties['captcha_storage'] == 'session' ? 2 : 1) . '&amp;nocache=' . time() . '" alt=""' . ($this->form_properties['doctype'] == 'xhtml' ? '/' : '') . '><a href="javascript:void(0)" title="' . $this->form_properties['language']['new_captcha'] . '">' . $this->form_properties['language']['new_captcha'] . '</a></div>';
    
    }
1216042
private function get_Text()
    {
        $text_formatting = array('b','strong','em','i','small','strong','sub','sup','ins','del','mark','br','hr');

        foreach ($this->dom_element->childNodes as $node)
        {
            if($node->nodeType == 3)
            {
                $this->set_text(trim($node->textContent));
                $this->textFormatting.=$node->textContent;
            }
            else if($node->nodeType == 1 && !!in_array($node->tagName, $text_formatting))
            {
                if(!!in_array($node->tagName, ['br','hr']))
                {
                    $this->textFormatting.= sprintf('<%s>',$node->tagName);
                }
                else
                {
                    $tag = $node->tagName;
                    $attrs = $this->attrs_to_string($node->attributes);
                    $text = $node->textContent;

                    $this->textFormatting.= sprintf('<%1$s%2$s>%3$s</%1$s>',$tag,$attrs,$text);
                }
            }
        }

        return $this;
    }
151001
public function renderForm()
    {
        $html = $this->form_open();
        $html .= $this->renderSubForm();
        $html .= $this->form_close();

        return $html;
    }
666244
private function form() {

    // Iterate through all the fields, rendering them
    foreach ( $this -> form_fields as $form_field ) {
      // Get Tag Type (input, select, option, button...)
      $tag_type = $form_field -> getTagType();
      $html_field = "";

      if( $this -> isUsingBootstrap() ){
        $html_field .= "<div class='form-group'>";
      }

      echo $form_field -> getFieldPreHTML();

      $html_field .= "<" . $tag_type . " ";
      $attributes = $form_field -> getAttributes();

      foreach ( $attributes as $att => $val ) {
        $html_field .= $att . "='" . $val . "' ";
      }
      // Remove last whitespace
      $html_field = rtrim($html_field);
      $html_field .= ">";

      if ( $tag_type == "button" || $tag_type == "a" || $tag_type == "select" ){
        if( $tag_type == "select" ){
          $options = $form_field -> getOptions();
          $values = $form_field -> getValues();
          // First option (Disabled)
          $html_field .= "<option value='' disabled='disabled' selected='true'>" . $form_field -> getFirstOption() . "</option>";
          foreach ($options as $option_key => $option_value ) {
            $html_field .= "<option value='" . $values[$option_key] . "'>" . $option_value . "</option>";
          }
          $html_field .= "</" . $tag_type . ">";
        }else{
          $html_field .= $form_field -> getInnerText();
          $html_field .= "</" . $tag_type . ">";
        }
      }

      if( $this -> isUsingBootstrap() ){
        $html_field .= "</div>";
      }

      echo $html_field;
    }

    echo $form_field -> getFieldPostHTML();
  }
781762
public function getHtml(): string
  {
    $this->attributes['type'] = $this->buttonType;
    $this->attributes['name'] = $this->submitName;

    if ($this->formatter) $this->attributes['value'] = $this->formatter->format($this->value);
    else                  $this->attributes['value'] = $this->value;

    $ret = $this->prefix;
    $ret .= $this->getHtmlPrefixLabel();
    $ret .= Html::generateVoidElement('input', $this->attributes);
    $ret .= $this->getHtmlPostfixLabel();
    $ret .= $this->postfix;

    return $ret;
  }
1348321
protected function getInput()
	{
		$html = array();

		// Initialize some field attributes.
		$class = $this->element['class'] ? ' class="checkboxes ' . (string) $this->element['class'] . '"' : ' class="checkboxes"';
		$checkedOptions = explode(',', (string) $this->element['checked']);

		// Start the checkbox field output.
		$html[] = '<fieldset id="' . $this->id . '"' . $class . '>';

		// Get the field options.
		$options = $this->getOptions();

		// Build the checkbox field output.
		$html[] = '<ul>';

		foreach ($options as $i => $option)
		{
			// Initialize some option attributes.
			if (!isset($this->value) || empty($this->value))
			{
				$checked = (in_array((string) $option->value, (array) $checkedOptions) ? ' checked="checked"' : '');
			}
			else
			{
				$value = !is_array($this->value) ? explode(',', $this->value) : $this->value;
				$checked = (in_array((string) $option->value, $value) ? ' checked="checked"' : '');
			}

			$class = !empty($option->class) ? ' class="' . $option->class . '"' : '';
			$disabled = !empty($option->disable) ? ' disabled="disabled"' : '';

			// Initialize some JavaScript option attributes.
			$onclick = !empty($option->onclick) ? ' onclick="' . $option->onclick . '"' : '';
			$label   = $this->translateLabel ? $this->getText()->translate($option->text) : $option->text;

			$html[] = '<li>';
			$html[] = '<input type="checkbox" id="' . $this->id . $i . '" name="' . $this->name . '"' . ' value="'
				. htmlspecialchars($option->value, ENT_COMPAT, 'UTF-8') . '"' . $checked . $class . $onclick . $disabled . '/>';

			$html[] = '<label for="' . $this->id . $i . '"' . $class . '>' . $label . '</label>';
			$html[] = '</li>';
		}

		$html[] = '</ul>';

		// End the checkbox field output.
		$html[] = '</fieldset>';

		return implode($html);
	}
1242101
public function getHtmlId()
    {
        $group = $this->getParentOfType('\\Zepi\\Web\\UserInterface\\Form\\Group');
        $form = $this->getParentOfType('\\Zepi\\Web\\UserInterface\\Form');
        $id = '';
        
        /**
         * If the field isn't assigned to a form group return false
         */
        if ($group !== false) {
            $id = $group->getHtmlId() . '-';
        } else if ($form !== false) {
            $id = $form->getHtmlId() . '-';
        }
        
        return $id . $this->key;
    }
262639
public function getHtml(): string
  {
    $html = $this->prefix;
    $html .= Html::generateElement('span', $this->attributes, $this->innerHtml, true);
    $html .= $this->postfix;

    return $html;
  }