Control: Textarea - 10quality/wpmvc-addon-administrator GitHub Wiki

Control used as a field type to display a HTML <textarea>.

Textarea

Usage

// Namespace and use statement...

class Settings extends Model
{
    // Class properties...

    protected function init()
    {
        // Other properties...

        $this->tabs = [
            'tab_id' => [
                'fields' => [

                    'textarea_field' => [
                        'type' => 'textarea',
                        'title' => __( 'Textarea' ),
                        'description' => __( 'Textarea description.' ),
                        'control' => [
                            'wide' => true,
                            'attributes' => [
                                'placeholder' => __( 'Description', 'my-domain' ),
                                'rows' => 5,
                            ]
                        ],
                    ],

                    // Other fields...
                ],
            ],
        ];
    }
}

Control options

Control Data type Description
wide bool Flag that indicates if the input should display wider or small.
attributes array HTML attributes listed as an array.
⚠️ **GitHub.com Fallback** ⚠️