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

Description #

Output text type=”number”.

Parameters #

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

Changelog #

VersionDescription
2.0.0Introduced.

Source #

File: includes/class/form.php

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

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

		$placeholder = $this->placeholder();
		$autocomplete = isset( $field['autocomplete'] )  ? ' autocomplete="off"' : '';
		$this->output .= '<div class="ap-form-fields-in">';
		$this->output .= '<input id="'. @$field['name'] .'" type="number" class="ap-form-control" value="'. @$field['value'] .'" name="'. @$field['name'] .'"'.$placeholder.' '. $this->attr( $field ) .$autocomplete.' />';
		$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