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

Description #

Select fields

Parameters #

  • $field
    array (Optional) Default value: array()

Changelog #

VersionDescription
2.0.1Introduced.

Source #

File: includes/class/form.php

	private function select_field($field = array()) {

		if ( isset( $field['label'] ) ) {
			$this->label(); }
		$this->output .= '<div class="ap-form-fields-in">';
		$this->output .= '<select id="'. @$field['name'] .'" class="ap-form-control" value="'. @$field['value'] .'" name="'. @$field['name'] .'" '. $this->attr( $field ) .'>';
		$this->output .= '<option value=""></option>';
		$this->select_options( $field );
		$this->output .= '</select>';
		$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