# fluentform/3.6.40/app/Services/FormBuilder/Components/TextArea.php

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

- Page: https://pluginprobe.com/plugins/fluentform/3.6.40/code/app/Services/FormBuilder/Components/TextArea.php
- Raw: https://pluginprobe.com/plugins/fluentform/3.6.40/raw/app/Services/FormBuilder/Components/TextArea.php
- Modified: 2020-02-10T10:03:32+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.40/code/app/Services/FormBuilder/Components/TextArea.php#L10-L20`.

```php
<?php

namespace FluentForm\App\Services\FormBuilder\Components;

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

        $textareaValue = $this->extractValueFromAttributes($data);

        $data['attributes']['class'] = trim('ff-el-form-control '.$data['attributes']['class']);
        $data['attributes']['id'] = $this->makeElementId($data, $form);

        if($tabIndex = \FluentForm\App\Helpers\Helper::getNextTabIndex()) {
            $data['attributes']['tabindex'] = $tabIndex;
        }

        $elMarkup = '<textarea %s>%s</textarea>';

        $elMarkup = sprintf(
            $elMarkup,
            $this->buildAttributes($data['attributes']),
            $textareaValue
        );

        $html = $this->buildElementMarkup($elMarkup, $data, $form);
        echo apply_filters('fluenform_rendering_field_html_'.$elementName, $html, $data, $form);
    }
}

```
