ninja_forms_display_list_type

The Ninja Forms ninja forms display list type function.

Description

ninja_forms_display_list_type( $field_id, $data ); 

Parameters (2)

0. $field_id
The field id.
1. $data
The data.

Usage

  1. if ( !function_exists( 'ninja_forms_display_list_type' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/fields/list.php'; 
  3.  
  4. // The field id. 
  5. $field_id = null; 
  6.  
  7. // The data. 
  8. $data = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = ninja_forms_display_list_type($field_id, $data); 
  12.  

Defined (1)

The function is defined in the following location(s).

/deprecated/includes/fields/list.php  
  1. function ninja_forms_display_list_type( $field_id, $data ) { 
  2. $field_row = ninja_forms_get_field_by_id( $field_id ); 
  3. $field_type = $field_row['type']; 
  4. if( $field_type == '_list' ) { 
  5. if ( isset( $data['list_type'] ) ) { 
  6. $list_type = $data['list_type']; 
  7. } else{ 
  8. $list_type = ''; 
  9.  
  10. ?> 
  11. <input type="hidden" id="ninja_forms_field_<?php echo $field_id;?>_list_type" value="<?php echo $list_type;?>"> 
  12. <?php