Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.

Field helper: Textarea

sy4mil edited this page Jan 28, 2013 · 2 revisions

Description

Return HTML textarea string, with appropriate class, type, name, id and values.

Usage

aq_field_textarea($field_id, $block_id, $text, $size);

Parameters

$field_id
(string)(required) The field id e.g. 'title'

$block_id
(string)(required) The id of the block. You usually get this from the $instance variable of the block.

$text
(mixed)(required) This is the value that is saved by the block using the given $field_id you've provided, e.g. $title (extracted from $instance)

$size
(string)(optional) The size of the textarea. Accepted parameters - min, small or full
Default: 'full'

Return

Return HTML textarea string

Example

<?php echo aq_field_texarea('content', $block_id, $content, $size = 'full') ?>

This will display a textarea

Notes

Changelog

Since 1.0

Clone this wiki locally