Description
Form a "textarea" field
Usage
BW_::bw_textarea( $name, $len, $text, $value, $rows, $args );Parameters
- $name
- ( string ) required – the field name
- $len
- ( numeric ) required – the length of the field ( e.g. 40 )
- $text
- ( string ) required – the label of the field (e.g. "Content" )
- $value
- ( string ) required – the value to display. If NULL then the current value is extracted from $_REQUEST[$name]
- $rows
- ( numeric ) optional default: 10 – the number of rows for the textarea field
- $args
- ( mixed ) optional –
Returns
voidSource
File name: oik-bwtrace/libs/class-BW-.phpLines:
1 to 22 of 22
static function bw_textarea( $name, $len, $text, $value, $rows=10, $args=null ) { $lab = self::label( $name, $text ); if ( $value === null ) { $value = bw_array_get( $_REQUEST, $name, '' ); bw_trace2( $value, "bw_textarea value" ); $value = wp_strip_all_tags( $value ); $value = stripslashes( $value ); } $spellcheck = bw_array_get( $args, "#spellcheck", null ); if ( null !== $spellcheck ) { $spellcheck = kv( "spellcheck", $spellcheck ); } $itext = iarea( $name, $len, $value, $rows, $spellcheck ); if ( self::is_table() ) { bw_tablerow(array($lab, $itext)); } else { $class = bw_array_get( $args, bw_gridrow, null ); bw_gridrow(array($lab, $itext), $class); } return; }View on GitHub View on Trac
Called by
1 to 3 of 3
Invoked by
Calls
1 to 6 of 6
- bw_array_get() – Return the array[index] or array->index (for an object) or a default value if not set
- bw_tablerow() – Display a table row or table head row when $tdtag = "th"
- bw_textarea() – Form a "textarea" field
- bw_trace2() – Trace $value to the trace log file if tracing is active
- iarea() – Create an HTML textarea field
- kv() – Create a keyword value pair
