name = 'textarea'; $this->label = __("Text Area",'acf'); $this->defaults = array( 'default_value' => '', 'formatting' => 'br', 'maxlength' => '', 'placeholder' => '', 'rows' => '' ); // do not delete! parent::__construct(); } /* * create_field() * * Create the HTML interface for your field * * @param $field - an array holding all the field's data * * @type action * @since 3.6 * @date 23/01/13 */ function create_field( $field ) { // vars $o = array( 'id', 'class', 'name', 'placeholder', 'rows' ); $e = ''; // maxlength if( $field['maxlength'] !== "" ) { $o[] = 'maxlength'; } // rows if( empty($field['rows']) ) { $field['rows'] = 8; } $e .= '

'textarea', 'name' => 'fields['.$key.'][default_value]', 'value' => $field['default_value'], )); ?>

'text', 'name' => 'fields[' .$key.'][placeholder]', 'value' => $field['placeholder'], )); ?>

'number', 'name' => 'fields[' .$key.'][maxlength]', 'value' => $field['maxlength'], )); ?>

'number', 'name' => 'fields[' .$key.'][rows]', 'value' => $field['rows'], 'placeholder' => 8 )); ?>

'select', 'name' => 'fields['.$key.'][formatting]', 'value' => $field['formatting'], 'choices' => array( 'none' => __("No formatting",'acf'), 'br' => __("Convert new lines into <br /> tags",'acf'), 'html' => __("Convert HTML into tags",'acf') ) )); ?>