AnsPress_Form::textarea_field( array $field = array() )

Description #

Textarea field output.

Parameters #

  • $field
    array (Optional) Field args. Default value: array()

Changelog #

VersionDescription
2.0Introduced.

Source #

File: includes/class/form.php

	private function textarea_field($field = array()) {
		$field = wp_parse_args( $field, array(
			'name' => 'textarea',
			'rows' => '6',
			'value' => '',
		) );

		if ( isset( $field['label'] ) ) {
			$this->label();
		}

		$this->output .= '<div class="ap-form-fields-in">';
		$placeholder = $this->placeholder();

		$this->output .= '<textarea id="'. $field['name'] .'" rows="'. $field['rows'] .'" class="ap-form-control" name="'. $field['name'] .'"'.$placeholder.' '. $this->attr( $field ) .'>'. $field['value'] .'</textarea>';

		$this->error_messages();

		if ( ! $this->field['show_desc_tip'] ) {
			$this->desc();
		}

		$this->output .= '</div>';
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment