[symfony-users] How update just a field of a table using link_to();

2010-04-07 Thread Jorge Krug
I have here a crud with two options: active and inactive. The idea is when the user click on the icon, change the value of field to 0 or 1, true or false. I have tried everything but i couln´t actualize the field. The commented lines show my frustrated tries. The View: ?php echo

Re: [symfony-users] How update just a field of a table using link_to();

2010-04-07 Thread Stéphane
Hi, If you use the normal form ({$model}Form) and no forwardUnless etc, does it works ? In such a case, this kind of action is pretty simple: In fact you want something to toggle the active state. From 1-0 and from 0-1... public function executeToggleActivate($request) {

Re: [symfony-users] How update just a field of a table using link_to();

2010-04-07 Thread Jorge Krug
It´s work! Here, the solution: In the view: ?php echo link_to('Atualizar', 'EventsEvents/ToggleActivate?id='.$events_events-getId(), array('method' = 'post', 'class' = 'bt-'.$suf.'active')) ? In the action: public function executeToggleActivate($request) {

Re: [symfony-users] How update just a field of a table using link_to();

2010-04-07 Thread Stéphane
You welcome ! Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale! On Wed, Apr 7, 2010 at 6:08 PM, Jorge Krug mercu...@gmail.com wrote: It´s work! Here, the solution: In the view: ?php echo