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

Description #

Output select field options.

Parameters #

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

Changelog #

VersionDescription
2.0.1Introduced.

Source #

File: includes/class/form.php

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

		foreach ( $field['options'] as $k => $opt ) {
			$this->output .= '<option value="'.$k.'" '.selected( $k, $field['value'], false ).'>'.$opt.'</option>'; }
	}

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