2017 © Pedro Peláez
 

library httextar

Creates textarea fields

image

flsouto/httextar

Creates textarea fields

  • Saturday, February 11, 2017
  • by flsouto
  • Repository
  • 0 Watchers
  • 0 Stars
  • 19 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

HtTextar

Produces Textareas. This is an extension of the HtTextin class., (*1)

Installation

Run composer:, (*2)

composer require flsouto/httextar

Usage

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)




Switch to Readonly

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)




Setting dimensions of textarea

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)

Alternative syntax for setting dimensions

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)

The Versions

11/02 2017

dev-master

9999999-dev

Creates textarea fields

  Sources   Download

The Requires

 

by Fabio Souto

html text forms widgets fields

11/02 2017

1.0.0

1.0.0.0

Creates textarea fields

  Sources   Download

The Requires

 

by Fabio Souto

html text forms widgets fields