Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は単純な形をしています:UserInfoForm()。フォームを最初にユーザーに表示するときは、Userモデルの特定のオブジェクトからのデータをフォームに入力する必要があります。誰かが私に方向性や例を教えてもらえますか?ありがとう!
UserInfoForm()
User
通常はこのようにしますが、UserInfoFormがUserオブジェクトにどのように関連しているかによって異なります。
$user = Doctrine::getTable('User')->findOneById($user_id); $this->form = new UserInfoForm($user);
編集:あなたがDoctrineを使用していると仮定しています。