GravityView  1.19.4
The best, easiest way to display Gravity Forms entries on your website.
type_number.php
Go to the documentation of this file.
1 <?php
2 /**
3  * number input type
4  */
5 
6 if( !class_exists('GravityView_FieldType_text') ) {
7  include_once( GRAVITYVIEW_DIR . 'includes/admin/field-types/type_text.php' );
8 }
10 
11  function render_input( $override_input = null ) {
12  if( isset( $override_input ) ) {
13  echo $override_input;
14  return;
15  }
16 
17  $class = '';
18 
19  $show_mt = $this->show_merge_tags();
20 
21  if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) {
22  $class = 'merge-tag-support mt-position-right mt-hide_all_fields ';
23  }
24  $class .= !empty( $this->field['class'] ) ? $this->field['class'] : 'widefat';
25 
26  ?>
27  <input name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>" type="number" value="<?php echo esc_attr( $this->value ); ?>" class="<?php echo esc_attr( $class ); ?>">
28  <?php
29  }
30 
31 }
32 
33 
34 
const GRAVITYVIEW_DIR
"GRAVITYVIEW_DIR" "./" The absolute path to the plugin directory
Definition: gravityview.php:35
show_merge_tags()
Verify if field should have merge tags.
$class
text input type
Definition: type_text.php:5
render_input($override_input=null)
Definition: type_number.php:11
number input type
Definition: type_number.php:9