Bug with the "action" form tag in this->data?
Hi, I've discovered a strange behavior in this->data. I have a form with checkboxes that looks like this: When I check this->data, the array looked like this (in 2.0.0 alpha, the only old version i have here): Array ( [Participant] => Array ( [1] => Array ( [id] => 1 ) [2] => Array ( [id] => 2 ) ) [action] => /myapp/participants/xls ) Now the array looks like this (since 2.0.3): Array ( [Participant] => Array ( [1] => Array ( [id] => 1 ) [2] => Array ( [id] => 2 ) [3] => Array ( [action] => /myapp/participants/xls ) ) ) The action is in the model entry. Do I do the mistake or is there a problem with the data array? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: Form Tag!!!!
OK, if this problem is only down to a single form tag there is no need to paste the rest of your view, some ppl are likely to see all of that and move onto another post. I would remove all options from the form tag and build it back up till you find the problem echo $form->create('UsersCoupon'); echo $form->create('UsersCoupon', array('id'=>'update')); echo $form->create('UsersCoupon', array('action'=>'changeStatustoUsed')); echo $form->create('UsersCoupon', array('id'=>'update', 'action'=>'changeStatustoUsed')); But the one I spotted in doing the above (couldn;t see it in amongst all your other code) is that your url array only contained an action and form accepts action as an option parameter so my 3rd/4th examples may work for you. HTH Paul 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
Re: Form Tag!!!!
Read here how to correctly define $form->create http://book.cakephp.org/view/183/Creating-Forms 2010/5/4 sherzo > > Anyone can help me > > > > > sherzo wrote: > > > > Hi all!!! > > > > I have the following code in my View: > > > > > > > > $form->create('UsersCoupon',array('id'=>'update','url'=>array('action'=>'changeStatustoUsed')));?> > > > > > > > > > > > >> class="ilk">KUPONLARIMADETDEGERBITIS > > TARIHI > > > $this->requestAction('users_coupons/listNotUsedCoupons'); ?> > > > > > > foreach($usersCoupons as $usersCoupon): > > ?> > > > $form->checkbox('cop.id.'.$usersCoupon['UsersCoupon']['id'], > array('value' > > => $usersCoupon['UsersCoupon']['id'])); ?> > > input($usersCoupon['UsersCoupon']['id'],array( > > 'type'=>'checkbox', 'label'=>false, > > 'name'=>'cop['.$usersCoupon['UsersCoupon']['id'].']', > > 'id'=>'cop_'.$usersCoupon['UsersCoupon']['id'])); > ?> > >class="ilk"> > > > $m > = $usersCoupon['UsersCoupon']['transaction_code']; > > > $count = > > $this->requestAction('users_coupons/countUserCouponPurchasePerTime/'.$m); > > > > echo $count;?> > $count*$usersCoupon['Coupon']['sale_price'];?>TL > echo $usersCoupon['Coupon']['expiration_date'];?> > > > > > ?> > > > > > > > > > > > > > > $form->submit('kullandiklarimi-arsive-at-button.gif', > > array('class'=>'submit'));?> > > > > > > > > > > > echo $paginator->prev('« ', null, null, array('class' => 'disabled')); > > echo $paginator->numbers(); ?> > > > > > > > echo $paginator->next(' »', null, null, array('class' => > 'disabled')); > > ?> > > > > Lütfen önce > kullandığınız > > kuponları işaretleyin. > > > > > > and as soon as I uncomment the form tag I will receive the following > error > > message!!! > > > > Fatal error: Cannot use object of type Xml as array in cakephp form > > > > any idea?!?! > > > > -- > View this message in context: > http://old.nabble.com/Form-Tag%21%21%21%21-tp28425388p28452273.html > Sent from the CakePHP mailing list archive at Nabble.com. > > 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.comFor > more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > 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
Re: Form Tag!!!!
Anyone can help me sherzo wrote: > > Hi all!!! > > I have the following code in my View: > > > $form->create('UsersCoupon',array('id'=>'update','url'=>array('action'=>'changeStatustoUsed')));?> > > > > > >class="ilk">KUPONLARIMADETDEGERBITIS > TARIHI > $this->requestAction('users_coupons/listNotUsedCoupons'); ?> > > foreach($usersCoupons as $usersCoupon): > ?> > $form->checkbox('cop.id.'.$usersCoupon['UsersCoupon']['id'], array('value' > => $usersCoupon['UsersCoupon']['id'])); ?> > input($usersCoupon['UsersCoupon']['id'],array( > 'type'=>'checkbox', 'label'=>false, > 'name'=>'cop['.$usersCoupon['UsersCoupon']['id'].']', > 'id'=>'cop_'.$usersCoupon['UsersCoupon']['id'])); ?> > >class="ilk"> >$m = > $usersCoupon['UsersCoupon']['transaction_code']; > > $count = > $this->requestAction('users_coupons/countUserCouponPurchasePerTime/'.$m); > > echo $count;?> $count*$usersCoupon['Coupon']['sale_price'];?>TL echo $usersCoupon['Coupon']['expiration_date'];?> > > ?> > > > > > > >$form->submit('kullandiklarimi-arsive-at-button.gif', > array('class'=>'submit'));?> > > > > > echo $paginator->prev('« ', null, null, array('class' => 'disabled')); > echo $paginator->numbers(); ?> > > > echo $paginator->next(' »', null, null, array('class' => 'disabled')); > ?> > > Lütfen önce kullandığınız > kuponları işaretleyin. > > > and as soon as I uncomment the form tag I will receive the following error > message!!! > > Fatal error: Cannot use object of type Xml as array in cakephp form > > any idea?!?! > -- View this message in context: http://old.nabble.com/Form-Tag%21%21%21%21-tp28425388p28452273.html Sent from the CakePHP mailing list archive at Nabble.com. 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
Form Tag!!!!
Hi all!!! I have the following code in my View: create('UsersCoupon',array('id'=>'update','url'=>array('action'=>'changeStatustoUsed')));?> KUPONLARIMADETDEGERBITIS TARIHI requestAction('users_coupons/listNotUsedCoupons'); ?> checkbox('cop.id.'.$usersCoupon['UsersCoupon']['id'], array('value' => $usersCoupon['UsersCoupon']['id'])); ?> input($usersCoupon['UsersCoupon']['id'],array( 'type'=>'checkbox', 'label'=>false, 'name'=>'cop['.$usersCoupon['UsersCoupon']['id'].']', 'id'=>'cop_'.$usersCoupon['UsersCoupon']['id'] )); ?> requestAction('users_coupons/countUserCouponPurchasePerTime/'.$m); echo $count;?>TL submit('kullandiklarimi-arsive-at-button.gif', array('class'=>'submit'));?> prev('« ', null, null, array('class' => 'disabled')); echo $paginator->numbers(); ?> next(' »', null, null, array('class' => 'disabled')); ?> Lütfen önce kullandığınız kuponları işaretleyin. and as soon as I uncomment the form tag I will receive the following error message!!! Fatal error: Cannot use object of type Xml as array in cakephp form any idea?!?! -- View this message in context: http://old.nabble.com/Form-Tag%21%21%21%21-tp28425388p28425388.html Sent from the CakePHP mailing list archive at Nabble.com. 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
form tag disappear from html markup
I have this code which output the result of a search 'articoli', 'pills' => 'pillole', 'previews' => 'anticipazioni', 'blogs' => 'post', 'videos' => 'video' ); $object_models = array( 'articles' => 'Article', 'pills' => 'Pill', 'previews' => 'Preview', 'blogs' => 'Blog', 'videos' => 'Video' ); ?> $values){ if(count($values) > 1) $empty = false; } if($empty) echo "Non si sono risultati per la ricerca"; //TODO: mettere in una casella error-box ?> $values){ //controlla se ci sono risultati per questa classe if(count($values) != 1){ //output del titolo foreach($object_strings as $object => $string){ if($key == $object){ ?> $model){ if($controller == $key){ $modello = $model; break; } } //output dei dati foreach($values as $i => $data){ if($i != 'total'){ //evita di stampare il totale ?> $page? $page + 1 : null; $urlBack = "/finder/search/$key/$limit/$goBack"; $urlForward = "/finder/search/$key/$limit/$goforward"; //TODO: //totale $string $results[$key][$total]; // paginazione ?> Vedi tutti i risultati The problem I've found is that the form inside this markup is not part of the end markup. Cakephp (I think) deleted it. I've tried to write that form in a thousand ways. But it's always deleted from markup. I'm almost sure that is a bug with Cakephp because the input tag inside the form tag is not deleted. Cake deletes just the surrounding form. Vedi tutti i risultati The other test form is there without any problemi. Can someone explain me what's wrong? Thanks --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---