Hey All,

This is my first attempt with an $ajax->form, and I am calling it from
within an element. Anyway, when I use this code:

<?php
echo $form->create('vote', array('url' => '/polls/vote', 'action' =>
'add'));
echo $form->input('sometestvalue', array('type' => 'hidden', 'value'
=> "test"));
echo $form->end('Vote!');
?>

The data gets posted, and everything is working as I would expect.
When I use:

<?php
echo $ajax->form(array('type' => 'vote',
                'options' => array(
                        'model'=>'PollChoice',
                        'update'=>'test',
                        'url' => array(
                        'controller' => 'polls',
                        'action' => 'vote'
                        )
                )
                ));
echo $form->input('sometestvalue', array('type' => 'hidden', 'value'
=> "test"));
echo $form->end('Vote!');
?>

The function vote gets executed, and the div refreshes, but no data
has been posted. I have confirmed this obviously using $this->data in
the controller, and also with firebug.

Can anyone see what I am doing wrong?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to