name = 'textarea'; $this->label = __( 'Textarea', 'cfs' ); } function html( $field ) { ?> create_field( array( 'type' => 'textarea', 'input_name' => "cfs[fields][$key][options][default_value]", 'value' => $this->get_option( $field, 'default_value' ), ) ); ?> create_field( array( 'type' => 'select', 'input_name' => "cfs[fields][$key][options][formatting]", 'options' => array( 'choices' => array( 'none' => __( 'None', 'cfs' ), 'auto_br' => __( 'Convert newlines to
', 'cfs' ) ), 'force_single' => true, ), 'value' => $this->get_option( $field, 'formatting', 'auto_br' ), ) ); ?> create_field( array( 'type' => 'true_false', 'input_name' => "cfs[fields][$key][options][required]", 'input_class' => 'true_false', 'value' => $this->get_option( $field, 'required' ), 'options' => array( 'message' => __( 'This is a required field', 'cfs' ) ), ) ); ?> get_option( $field, 'formatting', 'none' ); return ( 'none' == $formatting ) ? $value : nl2br( $value ); } }