2009-04-30 7 views
0

cakephpで登録フォームを作成するだけで作成できます。私の見解ではcakePHPフォームのエラー

<?php echo $form->create('User', array('url' => array('action' => 'register'))); ?> 
<?php echo $form->input('User.name', array('type'=>'text')); ?> 
<?php echo $form->end(); ?> 

を次のコードを使用している場合 私は、そのような私が問題を理解してくださいこの1

$model = "Form"</pre><pre>sprintf - [internal], line ?? 
FormHelper::hidden() - CORE/cake/libs/view/helpers/form.php, line 1021 
FormHelper::create() - CORE/cake/libs/view/helpers/form.php, line 214 
    include - APP/views/forms/index.ctp, line 5 
    View::_render() - CORE/cake/libs/view/view.php, line 662 

としてエラーが発生します。

答えて

0

はこれを試してみてください:

echo $form->create('User', array('url' => '/users/register')); 
+0

あるいは配列( 'URL' =>配列( 'コントローラ' => 'ユーザーを、 'アクション'=>」登録')); ! –

2

これも動作します:

echo $form->create('User', array('action' => 'register'));