You appear to be a bot. Output may be restricted
Description
Create an optional textareaIf the _cb field is present we use this value. otherwise we default to "on" Similar to this but the checkbox appears in the label for the textarea
- bw_checkbox_arr( $option, "Include?", $options, 'intro_cb' );
- bw_textarea_arr( $option, "Introduction", $text, 'intro', 60, 5 );
Usage
bw_textarea_cb_arr( $name, $text, $array, $index, $len, $rows );
Parameters
- $name
- ( string ) required – field name
- $text
- ( string ) required – field label
- $array
- ( array ) required –
- $index
- ( integer ) required –
- $len
- ( integer ) required –
- $rows
- ( integer ) optional default: 5 –
Returns
voidTO DO
In this version the checkbox appears next to the label. It might be nicer to have it next to the textarea. Note: We need to call bw_translate() here since the modified text won't be recognised when it reaches the label() function as it will have had the nbsp and checkbox HTML added by then.Source
File name: oik-bwtrace/libs/bobbforms.phpLines:
1 to 8 of 8
function bw_textarea_cb_arr( $name, $text, $array, $index, $len, $rows=5 ) { $name_index = $name.'['.$index.'_cb]'; $cb_value = bw_array_get( $array, $index.'_cb', "on" ); $cb_text = bw_translate( $text ); $cb_text .= " "; $cb_text .= icheckbox( $name_index, $cb_value ); bw_textarea_arr( $name, $cb_text, $array, $index, $len, $rows ); }View on GitHub View on Trac