hi, basically what i'm trying to do is hide two fields from the form Stock in the admin then when the user is creating or editing a new stock object. there is some background calculation that is done then passed as a request before the form is processed.
The code am trying to process is this in /lib/model/doctrine/Stock.class public function calculateTax($price) { $afterTax = $price * sfConfig::get('app_tax_rate'); return $afterTax; } i then pass this function to a stockActions class using this code public function executeUpdate(sfWebRequest $request) { $this->stock = $this->getRoute()->getObject(); $this->form = this->configuration->getForm($this->stock); $price = $request->getParameter('price'); $mystock = new Stock(); $taxRate = $mystock->calculateTax($price); $request->setParameter('vat', $taxRate); $request->setParameter('amount_with_vat', ($taxRate+$price)); $this->processForm($request, $this->form); $this->setTemplate('edit'); } what am trying to do is overide the default update function by getting and calculating the appropriate parameters before the form is processed. However, the values am calculating are not being processed with the form. what am i doing wrong? or is there another way to do this? Thanks
-- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.