dev-master
9999999-devCreates textarea fields
The Requires
by Fabio Souto
html text forms widgets fields
1.0.0
1.0.0.0Creates textarea fields
The Requires
by Fabio Souto
html text forms widgets fields
Wallogit.com
2017 © Pedro Peláez
Creates textarea fields
Produces Textareas. This is an extension of the HtTextin class., (*1)
Run composer:, (*2)
composer require flsouto/httextar
By default, the textar widget is rendered in writable mode. See example:, (*3)
<?php
use FlSouto\HtTextar;
require_once('vendor/autoload.php');
$field = new HtTextar('description');
$field->context(['description'=>'This is a very long description']);
echo $field;
Outputs:, (*4)
Use the readonly method to switch to readonly mode:, (*5)
use FlSouto\HtTextar;
require_once('vendor/autoload.php');
$field = new HtTextar('description');
$field->readonly();
$field->context(['description'=>'This is a very long description']);
echo $field;
Outputs:, (*6)
You can set the cols and rows attributes by using the respective methods:, (*7)
use FlSouto\HtTextar;
$field = new HtTextar('description');
$field->cols(80)->rows(10);
echo $field;
Outputs:, (*8)
Notice: this is only a shortcut to calling $field->attrs(['cols'=>80,'rows'=>10]), (*9)
You can use the size method passing a string in the format "COLSxROWS" to set both dimensions in one go:, (*10)
$field = new HtTextar('description'); $field->size('80x10'); echo $field;
Output:, (*11)
To learn more about everything you can do with this widget, please refer to the following documentations: - HtTextin - HtWidget - HtField, (*12)
Creates textarea fields
html text forms widgets fields
Creates textarea fields
html text forms widgets fields