ninja_forms_field_hidden_edit_sub

The Ninja Forms ninja forms field hidden edit sub function.

Description

ninja_forms_field_hidden_edit_sub( $field_id, $data ); 

Parameters (2)

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

Usage

  1. if ( !function_exists( 'ninja_forms_field_hidden_edit_sub' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/fields/hidden.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_field_hidden_edit_sub($field_id, $data); 
  12.  

Defined (1)

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

/deprecated/includes/fields/hidden.php  
  1. function ninja_forms_field_hidden_edit_sub( $field_id, $data ) { 
  2. if(isset($data['default_value'])) { 
  3. $default_value = $data['default_value']; 
  4. }else{ 
  5. $default_value = ''; 
  6.  
  7. if(isset($data['label'])) { 
  8. $label = $data['label']; 
  9. }else{ 
  10. $label = ''; 
  11. ?> 
  12. <label> 
  13. <?php echo $label; ?> 
  14. </label> 
  15. <input id="ninja_forms_field_<?php echo $field_id;?>" name="ninja_forms_field_<?php echo $field_id;?>" type="text" class="<?php echo $field_class;?>" value="<?php echo $default_value;?>" rel="<?php echo $field_id;?>" /> 
  16. <?php