Hidden.php 969 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php if ( ! defined( 'ABSPATH' ) ) exit;
  2. /**
  3. * Class NF_Fields_Hidden
  4. */
  5. class NF_Fields_Hidden extends NF_Abstracts_Input
  6. {
  7. protected $_name = 'hidden';
  8. protected $_nicename = 'Hidden';
  9. protected $_section = 'misc';
  10. protected $_icon = 'eye-slash';
  11. protected $_type = 'hidden';
  12. protected $_templates = 'hidden';
  13. protected $_wrap_template = 'wrap-no-label';
  14. protected $_settings_only = array(
  15. 'key', 'label', 'default', 'admin_label'
  16. );
  17. protected $_use_merge_tags_include = array( 'calculations' );
  18. public function __construct()
  19. {
  20. parent::__construct();
  21. $use_merge_tags = array( 'include' => array( 'calculations' ) );
  22. $this->_settings[ 'label' ][ 'width' ] = 'full';
  23. $this->_settings[ 'default' ][ 'group' ] = 'primary';
  24. $this->_settings[ 'default' ][ 'user_merge_tags' ] = $use_merge_tags;
  25. $this->_nicename = __( 'Hidden', 'ninja-forms' );
  26. }
  27. }