# fluentform/3.6.22/app/Services/FormBuilder/Components/CustomHtml.php

Fluent Forms – Customizable Contact Forms, Survey, Quiz, &amp; Conversational Form Builder, version 3.6.22. 33 lines.

- Page: https://pluginprobe.com/plugins/fluentform/3.6.22/code/app/Services/FormBuilder/Components/CustomHtml.php
- Raw: https://pluginprobe.com/plugins/fluentform/3.6.22/raw/app/Services/FormBuilder/Components/CustomHtml.php
- Modified: 2020-06-19T11:01:22+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluentform/3.6.22/code/app/Services/FormBuilder/Components/CustomHtml.php#L10-L20`.

```php
<?php

namespace FluentForm\App\Services\FormBuilder\Components;

use FluentForm\Framework\Helpers\ArrayHelper;

class CustomHtml extends BaseComponent
{
	/**
	 * Compile and echo the html element
	 * @param  array $data [element data]
	 * @param  stdClass $form [Form Object]
	 * @return viod
	 */
	public function compile($data, $form)
	{
        $elementName = $data['element'];
        $data = apply_filters('fluenform_rendering_field_data_'.$elementName, $data, $form);

        $hasConditions = $this->hasConditions($data) ? 'has-conditions ' : '';
		$cls = trim($this->getDefaultContainerClass() .' '.$hasConditions);
		if($containerClass = ArrayHelper::get($data, 'settings.container_class')) {
            $cls .= ' '.$containerClass;
        }
		$atts = $this->buildAttributes(
			\FluentForm\Framework\Helpers\ArrayHelper::except($data['attributes'], 'name')
		);
		$html = "<div class='{$cls}' {$atts}>{$data['settings']['html_codes']}</div>";
        $html = apply_filters('fluenform_rendering_field_html_'.$elementName, $html, $data, $form);
        echo $html;
    }
}

```
