Example #1
0
 /**
  * Override setPosted, to correct manually entered data that is lacking leading zeroes
  * @return $this
  */
 protected function setPosted()
 {
     if (!empty($_POST[$this->name])) {
         $post = xsschars($_POST[$this->name]);
         // This is a fix for when users manually input dates without using leading 0s
         $post = $this->getCorrectedPostedDate($post);
         $this->posted = $post;
         $this->selected = $post;
         // so we can always retrieve the selected fields with getSelected()
     }
     return $this;
 }
Example #2
0
 /**
  * store posted values
  */
 protected function setPosted()
 {
     if (isset($_POST[$this->name]) && !is_blank($_POST[$this->name])) {
         $post = $_POST[$this->name];
         if (is_array($post)) {
             array_walk($post, 'xsschars');
         } else {
             $post = xsschars($post);
         }
         $this->posted = $post;
         $this->selected = $post;
         // so we can always retrieve the selected fields with getSelected()
     }
 }