NF_Fields_Note

Class NF_Fields_Note.

Defined (1)

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

/includes/Fields/Note.php  
  1. class NF_Fields_Note extends NF_Fields_Hidden 
  2. protected $_name = 'note'; 
  3.  
  4. protected $_type = 'note'; 
  5.  
  6. protected $_nicename = 'Note'; 
  7.  
  8. protected $_section = ''; 
  9.  
  10. protected $_icon = 'sticky-note-o'; 
  11.  
  12. protected $_templates = 'null'; 
  13.  
  14. protected $_aliases = array( 'notes', 'info' ); 
  15.  
  16. protected $_settings_only = array( 
  17. 'label', 'default' 
  18. ); 
  19.  
  20. public function __construct() 
  21. parent::__construct(); 
  22.  
  23. $this->_settings[ 'value_mirror' ] = array( 
  24. 'name' => 'value_mirror',  
  25. 'type' => 'html',  
  26. 'label' => __( 'HTML', 'ninja-forms'),  
  27. 'width' => 'full',  
  28. 'group' => 'primary',  
  29. 'mirror' => 'default',  
  30. ); 
  31.  
  32. $this->_settings[ 'label' ][ 'width' ] = 'full'; 
  33. $this->_settings[ 'label' ][ 'group' ] = 'advanced'; 
  34.  
  35. $this->_settings[ 'default' ][ 'type' ] = 'rte'; 
  36. $this->_settings[ 'default' ][ 'group' ] = 'advanced'; 
  37.  
  38. $this->_settings[ 'value_mirror' ][ 'value' ] = $this->_settings[ 'default' ][ 'value' ] = __( 'Note text can be edited in the note field\'s advanced settings below.' ); 
  39.  
  40. $this->_nicename = __( 'Note', 'ninja-forms' ); 
  41.  
  42. add_filter( 'nf_sub_hidden_field_types', array( $this, 'hide_field_type' ) ); 
  43.  
  44. function hide_field_type( $field_types ) 
  45. $field_types[] = $this->_name; 
  46. return $field_types;