[ Index ]

MailPress 544

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    

title

Body

[close]

/mp-includes/class/options/form/field_types/textarea/ -> textarea.php (source)

   1  <?php
   2  class MP_Form_field_type_textarea extends MP_form_field_type_
   3  {
   4      var $file            = __FILE__;
   5  
   6      var $id            = 'textarea';
   7      var $field_not_input     = true;
   8  
   9      var $category         = 'html';
  10      var $order         = 20;
  11  
  12  	function submitted($field)
  13      {
  14          $value    = trim($_POST[$this->prefix][$field->form_id][$field->id]);
  15  
  16          $required     = (isset($field->settings['controls']['required']) && $field->settings['controls']['required']);
  17          $empty     = empty($value);
  18  
  19          if ($required && $empty)
  20          {
  21              $field->submitted['on_error'] = 1;
  22              return $field;
  23          }
  24          $field->submitted['value'] = $value;
  25          $field->submitted['text']  = apply_filters('the_content', stripslashes($value));
  26          return $field;
  27      }
  28  
  29  	function attributes_filter($no_reset)
  30      {
  31          $this->field->settings['attributes']['tag_content'] = base64_decode($this->field->settings['attributes']['tag_content']);
  32  
  33          if (!$no_reset) return;
  34  
  35          $this->field->settings['attributes']['tag_content'] = trim(stripslashes($_POST[$this->prefix][$this->field->form_id][$this->field->id]));
  36          $this->attributes_filter_css();
  37      }
  38  }
  39  new MP_Form_field_type_textarea(__('Multi-line Input', MP_TXTDOM));


Generated: Thu Apr 28 18:38:52 2016 Cross-referenced by PHPXref 0.7.1