Hi
I'm attempting to make an order form using ajax. I've used the ajax
helper.
Now, the request is being made and the right action called in the
right controller... but no form data is sent.
I can use pr( $this ) in my action (addToBasket) to see that the right
action is requested, just with no POST data ($this->data is empty).
Here's my form code:
<table>
<?= $ajax->form( '/orders/addToBasket', 'post', array( 'url' => '/
orders/addToBasket', 'update' => 'basket' ) ); ?>
<input type="hidden" id="image_id" name="image_id" />
<?
foreach( $print_sizes as $k => $v )
{
echo '<tr><td>' . $v . ': </td><td><input name="photo[' . $k . ']"
value="" class="narrow" /></td></tr>';
}
?>
<tr><td> </td><td><?= $html->submit( 'Add', array( 'class' =>
'button' ) ); ?></td></tr>
</form>
</table>
<p id="basket">Your basket contains 0 items</p>
And the addToBasket method (not much more than a placeholder as yet):
function addToBasket()
{
$this->layout = 'ajax';
pr( $this );
}
Can anyone see where I'm going wrong?
Thanks
voidstate
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---