Hmmm, maybe in version 2.1.x the option has different key. You can check
this looking in CakePHP libraries.

Murgan, Alexis Germán
Desarrollador & Diseñador
Web: german.murgan.com.ar
Email: [email protected]
MSN: [email protected]
Móvil: +5493424663813


2013/5/8 André Luis <[email protected]>

> Lol, this one didnt work for me in version 2.1.something, but now in 2.3.4
> is working fine, tnx
>
> Em quarta-feira, 8 de maio de 2013 08h46min55s UTC-3, Mancho Murgan
> escreveu:
>>
>> Actually with option type you can change the hardcoded method.
>>
>> echo $this->Form->create('User', array('type' => 'post'));
>>
>> Murgan, Alexis Germán
>> Desarrollador & Diseñador
>> Web: german.murgan.com.ar
>> Email: [email protected]
>> MSN: [email protected]
>> Móvil: +5493424663813
>>
>>
>> 2013/5/8 André Luis <[email protected]>
>>
>>> What if you create a hidden field " $this->Form->hidden('_method',**
>>> array('name'=>'_method','**value'=>'POST')) " in your form?? It should
>>> override the other one
>>>
>>>
>>> Em segunda-feira, 6 de maio de 2013 15h47min55s UTC-3, advantage+
>>> escreveu:
>>>
>>>> Running into a weird issue where my form as rendered the HTML shows:
>>>>
>>>>
>>>>
>>>> <form id="EditProfile" class="****form-horizontal" accept-**charse**t="
>>>> utf-8" method="post" **action**="/manage/profile">
>>>>
>>>>
>>>>
>>>> This form is submitted using ajax and the function is used by many
>>>> forms thru the site:
>>>>
>>>> $.ajax*({*
>>>>
>>>> *                *type: "POST",
>>>>
>>>>                 url: $*(*sel*)*.attr*(*'action'*)*,
>>>>
>>>>                 data: $*(*sel*)*.formSerialize*()*,
>>>>
>>>>                 dataType: 'json',
>>>>
>>>>
>>>>
>>>> And in the controller I have if($this->request->is('ajax') && ($this->
>>>> request->is('post'))
>>>>
>>>>
>>>>
>>>> But it fails on this 1 form because for some reason it is changing to
>>>> PUT.
>>>>
>>>>
>>>>
>>>> Are there reason why this would be happening? I looked at a few of my
>>>> forms using this js function and all of the forms and all are set up the
>>>> exact same way / Form->helper standard inputs / selects.
>>>>
>>>>
>>>>
>>>> I even added into the form with issues 'method' => 'POST' (upper and
>>>> lower) but it still fires off a PUT request. Renders as POST but inspecting
>>>> the request shows:
>>>>
>>>>
>>>>
>>>> application/x-www-form-**urlenco**ded
>>>>
>>>> _methodPUT
>>>>
>>>>
>>>>
>>>> Ideas would be welcome.
>>>>
>>>  --
>>> Like Us on FaceBook 
>>> https://www.facebook.com/**CakePHP<https://www.facebook.com/CakePHP>
>>> Find us on Twitter http://twitter.com/CakePHP
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "CakePHP" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to cake-php+u...@**googlegroups.com.
>>> To post to this group, send email to [email protected].
>>>
>>> Visit this group at 
>>> http://groups.google.com/**group/cake-php?hl=en<http://groups.google.com/group/cake-php?hl=en>
>>> .
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>> .
>>>
>>>
>>>
>>
>>  --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to