library/core/class.form.php
public function Save() {
      $SaveResult = FALSE;
      if ($this->ErrorCount() == 0) {
         if (!isset($this->_Model)) trigger_error(
            ErrorMessage(
               "You cannot call the form's save method if a model has not been defined.",
               "Form", "Save"), E_USER_ERROR);
         
         $Data = $this->FormValues();
         if (method_exists($this->_Model, 'FilterForm'))
            $Data = $this->_Model->FilterForm($this->FormValues());

         $Args = array_merge(func_get_args(),
            array(
               NULL,
               NULL,
               NULL,
               NULL,
               NULL,
               NULL,
               NULL,
               NULL,
               NULL,
               NULL));
         $SaveResult = $this->_Model->Save($Data, $Args[0], $Args[1],
            $Args[2], $Args[3], $Args[4], $Args[5], $Args[6], $Args[7],
            $Args[8], $Args[9]);
         if ($SaveResult === FALSE) {
            // NOTE: THE VALIDATION FUNCTION NAMES ARE ALSO THE LANGUAGE
            // TRANSLATIONS OF THE ERROR MESSAGES. CHECK THEM OUT IN THE LOCALE
            // FILE.
            $this->SetValidationResults($this->_Model->ValidationResults());
         }
      }
      return $SaveResult;
   }
public function Save() {
      $SaveResult = FALSE;
      if ($this->ErrorCount() == 0) {
         if (!isset($this->_Model)) trigger_error(
            ErrorMessage(
               "You cannot call the form's save method if a model has not been defined.",
               "Form", "Save"), E_USER_ERROR);
         
         $Data = $this->FormValues();
         if (method_exists($this->_Model, 'FilterForm'))
            $Data = $this->_Model->FilterForm($this->FormValues());

         $Args = array_merge(func_get_args(),
            array(
               NULL,
               NULL,
               NULL,
               NULL,
               NULL,
               NULL,
               NULL,
               NULL,
               NULL,
               NULL));
         $SaveResult = $this->_Model->Save($Data, $Args[0], $Args[1],
            $Args[2], $Args[3], $Args[4], $Args[5], $Args[6], $Args[7],
            $Args[8], $Args[9]);
         if ($SaveResult === FALSE) {
            // NOTE: THE VALIDATION FUNCTION NAMES ARE ALSO THE LANGUAGE
            // TRANSLATIONS OF THE ERROR MESSAGES. CHECK THEM OUT IN THE LOCALE
            // FILE.
            $this->SetValidationResults($this->_Model->ValidationResults());
         }
      }
      return $SaveResult;
   }
public function Save ( ) { $ SaveResult = FALSE ; if ( $ this -> ErrorCount ( ) == 0 ) { if ( ! isset ( $ this -> _Model ) ) trigger_error ( ErrorMessage ( "You cannot call the form's save method if a model has not been defined." , "Form" , "Save" ) , E_USER_ERROR ) ; $ Data = $ this -> FormValues ( ) ; if ( method_exists ( $ this -> _Model , 'FilterForm' ) ) $ Data = $ this -> _Model -> FilterForm ( $ this -> FormValues ( ) ) ; $ Args = array_merge ( func_get_args ( ) , array ( NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL ) ) ; $ SaveResult = $ this -> _Model -> Save ( $ Data , $ Args [ 0 ] , $ Args [ 1 ] , $ Args [ 2 ] , $ Args [ 3 ] , $ Args [ 4 ] , $ Args [ 5 ] , $ Args [ 6 ] , $ Args [ 7 ] , $ Args [ 8 ] , $ Args [ 9 ] ) ; if ( $ SaveResult === FALSE ) { // NOTE: THE VALIDATION FUNCTION NAMES ARE ALSO THE LANGUAGE // TRANSLATIONS OF THE ERROR MESSAGES. CHECK THEM OUT IN THE LOCALE // FILE. $ this -> SetValidationResults ( $ this -> _Model -> ValidationResults ( ) ) ; } } return $ SaveResult ; }
This is a convenience method so that you don't have to code this every time
you want to save a simple model's data.

It uses the assigned model to save the sent form fields.
If saving fails, it populates $this->_ValidationResults with validation errors & related fields.

@return unknown
This is a convenience method so that you don t have to code this every time you want to save a simple model s data .