Monday, December 29, 2008

form->create duplicating my controller name

<?
echo $form->create('Client',array('action'=>'add'));
echo $form->input('firstname');
echo $form->input('lastname');
echo $form->end('Save Client');
?>


I have a simple controller / model / table for adding clients. My
model is called clients.php, my controller is clients_controller.php


The above code produces this
<form id="ClientAddForm" method="post" action="/app/webroot/index.php/
clients/clients/add">

as you can see, clients is listed twice. Any ideas why? It then
looks for clients as a function inside my controller instead of the
add function.

--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: