NF_Fields_Textarea

Class NF_Field_Textarea.

Defined (1)

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

/includes/Fields/Textarea.php  
  1. class NF_Fields_Textarea extends NF_Abstracts_Input 
  2. protected $_name = 'textarea'; 
  3.  
  4. protected $_section = 'common'; 
  5.  
  6. protected $_icon = 'paragraph'; 
  7.  
  8. protected $_type = 'textarea'; 
  9.  
  10. protected $_templates = 'textarea'; 
  11.  
  12. protected $_test_value = 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.'; 
  13.  
  14. protected $_settings = array( 'input_limit_set', 'rte_enable', 'rte_media', 'rte_mobile', 'disable_browser_autocomplete', 'textarea_rte', 'disable_rte_mobile', 'textarea_media', ); 
  15.  
  16. public function __construct() 
  17. parent::__construct(); 
  18.  
  19. $this->_nicename = __( 'Paragraph Text', 'ninja-forms' ); 
  20.  
  21. $this->_settings[ 'default' ][ 'type' ] = 'textarea'; 
  22. $this->_settings[ 'placeholder' ][ 'type' ] = 'textarea'; 
  23.  
  24. add_filter( 'ninja_forms_merge_tag_value_' . $this->_name, array( $this, 'filter_merge_tag_value' ), 10, 2 ); 
  25.  
  26. public function admin_form_element( $id, $value ) 
  27. return "<textarea class='widefat' name='fields[$id]'>$value</textarea>"; 
  28.  
  29. public function filter_merge_tag_value( $value, $field ) { 
  30. return wpautop( $value );