\ReduxFramework_textarea

This is a test3.

Textarea

Textarea

Arguments

Name Type Default Description.
type string 'text' Controls the field type.
id string Must be unique to all other options.
title string Title of item to be displayed.
subtitle string Subtitle of item to be displayed.
desc string Description of item to be displayed.
compiler boolean false Flag to run the compiler hook.
class string Append any number of classes to the field.
required string/array Provide the parent and value which affects this field's visibility.
default string Default text.
validate string Controls the entered validation.
placeholder string Message to display when no text is present.
rows int 6 Numbers of text rows to display.
allowed_html array array of allowed HTML tags. See http://codex.wordpress.org/Function_Reference/wp_kses for more information.

Example Declaration

<?php
$fields = array(
'id'=>'7',
'type' => 'textarea',
'title' => __('Textarea Option - HTML Validated Custom', 'redux-framework-demo'),
'subtitle' => __('Custom HTML Allowed (wp_kses)', 'redux-framework-demo'),
'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'),
'validate' => 'html_custom',
'default' => '<p>Some HTML is allowed in here.</p>',
'allowed_html' => array(
'a' => array(
'href' => array(),
'title' => array()
),
'br' => array(),
'em' => array(),
'strong' => array()
)
);
?>

##Textarea ![Textarea](https://f.cloud.github.com/assets/3412363/1588098/1f194854-5249-11e3-95be-f100bf779ce3.png) ###Arguments See blow. | Name | Type | Default | Description. | |-------------|--------|----------|---------------------------------------------| | type | string | 'text' | Controls the field type. | | id | string | | Must be unique to all other options. | | title | string | | Title of item to be displayed. | | subtitle | string | | Subtitle of item to be displayed. | | desc | string | | Description of item to be displayed. | | compiler | boolean | false | Flag to run the compiler hook. | | class | string | | Append any number of classes to the field. | | required | string/array | | Provide the parent and value which affects this field's visibility. | | default | string | | Default text. | | validate | string | | Controls the entered validation. | | placeholder | string | | Message to display when no text is present. | | rows | int | 6 | Numbers of text rows to display. | | allowed_html| array | | array of allowed HTML tags. See http://codex.wordpress.org/Function_Reference/wp_kses for more information. | ###Example Declaration
$fields = array(
'id'=>'7',
'type' => 'textarea',
'title' => __('Textarea Option - HTML Validated Custom', 'redux-framework-demo'),
'subtitle' => __('Custom HTML Allowed (wp_kses)', 'redux-framework-demo'),
'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'),
'validate' => 'html_custom',
'default' => '

Some HTML is allowed in here.

', 'allowed_html' => array( 'a' => array( 'href' => array(), 'title' => array() ), 'br' => array(), 'em' => array(), 'strong' => array() ) );
$fields = array( 'id'=>'7', 'type' => 'textarea', 'title' => __('Textarea Option - HTML Validated Custom', 'redux-framework-demo'), 'subtitle' => __('Custom HTML Allowed (wp_kses)', 'redux-framework-demo'), 'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'), 'validate' => 'html_custom', 'default' => '

Some HTML is allowed in here.

', 'allowed_html' => array( 'a' => array( 'href' => array(), 'title' => array() ), 'br' => array(), 'em' => array(), 'strong' => array() ) );
Here is another. And one more.

Summary

Methods
Properties
Constants
__construct()
render()
()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct(mixed $field, mixed $value, mixed $parent)

Field Constructor.

Example Declaration:

  $fields = array(
      'id'=>'7',
      'type' => 'textarea',
      'title' => __('Textarea Option - HTML Validated Custom', 'redux-framework-demo'),
      'subtitle' => __('Custom HTML Allowed (wp_kses)', 'redux-framework-demo'),
      'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'),
      'validate' => 'html_custom',
      'default' => '

Some HTML is allowed in here.

', 'allowed_html' => array( 'a' => array( 'href' => array(), 'title' => array() ), 'br' => array(), 'em' => array(), 'strong' => array() ) );

Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function

Example Documentation: $fields = array( 'id' => 'css_editor', 'type' => 'ace_editor', 'title' => ('CSS Code', 'redux-framework-demo'), 'subtitle' => ('Paste your CSS code here.', 'redux-framework-demo'), 'mode' => 'css', 'theme' => 'monokai', 'desc' => 'Possible modes can be found at http://ace.c9.io/</a>.', 'default' => "#header{\nmargin: 0 auto;\n}" );

Parameters

mixed $field

| Name | Type | Default | Description. | |-------------|--------|----------|---------------------------------------------| | type | string | 'text' | Controls the field type. | | id | string | | Must be unique to all other options. | | title | string | | Title of item to be displayed. | | subtitle | string | | Subtitle of item to be displayed. | | desc | string | | Description of item to be displayed. | | compiler | boolean | false | Flag to run the compiler hook. | | class | string | | Append any number of classes to the field. | | required | string/array | | Provide the parent and value which affects this field's visibility. | | default | string | | Default text. | | validate | string | | Controls the entered validation. | | placeholder | string | | Message to display when no text is present. | | rows | int | 6 | Numbers of text rows to display. | | allowed_html| array | | array of allowed HTML tags. See http://codex.wordpress.org/Function_Reference/wp_kses for more information. |

mixed $value

Constructed by Redux class. Based on the passing in $field['defaults'] value and what is stored in the database.

mixed $parent

ReduxFramework object is passed for easier pointing.

render()

render() : Object

Holds configuration settings for each field in a model.

Defining the field options

array['fields'] array Defines the fields to be shown by scaffolding.

     [fieldName]         array Defines the options for a field, or just enables the field if array is not applied.
         ['name']        string Overrides the field name (default is the array key)
         ['model']       string (optional) Overrides the model if the field is a belongsTo associated value.
         ['width']       string Defines the width of the field for paginate views. Examples are "100px" or "auto"
         ['align']       string Alignment types for paginate views (left, right, center)
         ['format']      string Formatting options for paginate fields. Options include ('currency','nice','niceShort','timeAgoInWords' or a valid Date() format)
         ['title']       string Changes the field name shown in views.
         ['desc']        string The description shown in edit/create views.
         ['readonly']    boolean True prevents users from changing the value in edit/create forms.
         ['type']        string Defines the input type used by the Form helper (example 'password')
         ['options']     array Defines a list of string options for drop down lists.
         ['editor']      boolean If set to True will show a WYSIWYG editor for this field.
         ['default']     string The default value for create forms.

Returns

Object —

A new editor object.

()

() : 

Test

Returns