NF_Abstracts_UserInfo

Class NF_Abstracts_UserInfo.

Defined (1)

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

/includes/Abstracts/UserInfo.php  
  1. abstract class NF_Abstracts_UserInfo extends NF_Fields_Textbox 
  2. protected $_name = 'input'; 
  3.  
  4. protected $_section = 'userinfo'; 
  5.  
  6. protected $_type = 'textbox'; 
  7.  
  8. public static $_base_template = 'textbox'; 
  9.  
  10. public function __construct() 
  11. parent::__construct(); 
  12.  
  13. $this->_settings = $this->load_settings( 
  14. array( 'key', 'label', 'label_pos', 'required', 'default', 'placeholder', 'classes', 'admin_label', 'help', 'description' ) 
  15. ); 
  16.  
  17. $this->_settings[ 'default' ][ 'settings' ][ 'default_type' ][ 'options' ][] = array( 
  18. 'label' => __( 'User Meta (if logged in)', 'ninja-forms' ),  
  19. 'value' => 'user-meta' 
  20. ); 
  21.  
  22. $this->_settings[ 'default' ][ 'settings' ][ 'default_type' ][ 'value' ] = 'user-meta'; 
  23.  
  24. add_filter( 'ninja_forms_render_default_value', array( $this, 'filter_default_value' ), 10, 3 ); 
  25.  
  26. abstract public function filter_default_value( $default_value, $field_class, $settings );