In the controller:
$sum = 0;
$this->data['Modelname']['field1'] *= 0.55 ;
$this->data['Modelname']['hidden'] = $this->data['Modelname']['field1'] +
$this->data['Modelname']['field2'] + $this->data['Modelname']['field3'];

 $this->Modelname->save($this->data) ;


2010/1/18 Guran <guran.banga...@gmail.com>

> Thanks to all who have taken the time to help out without being
> condescending or intimidating. I am a newbee and this help has
> encouraged me to keep on learning CakePHP. Once I get good I will help
> others on this forum.
>
> Now on my expense submitter i am working on - there are field1,
> field2, and field3.Hidden is the 'total' field. The user enters
> numerical values in field1, field2, and field3. Before the data is
> saved into the database field1 needs to be multiplied with 0.55 and
> saved back in field1. Then the 3 fields need to be added and saved in
> the hidden field 'total'.
>
> I am looking for an access point to get to the fields and do my
> computation before they are saved into the database. Any suggestions
> and help is appreciated.
>
> ...guran
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com<cake-php%2bunsubscr...@googlegroups.com>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>
>


-- 
Mirko Coz Berrospi
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to