now I changed my code to this, it works now.

        $form = $this->get('form.factory')->createBuilder('form',$account)
                ->add('username', 'text')
                ->add("password","password")
            ->getForm();


Regards,

Haulyn Jason
Founder, http://domix.in
Rm. 807, Qilu Software Tower, Qilu Software Park
1 Shunhua Rd., High-Tech Development Zone
Jinan, Shandong 250101, P. R. China
Tel: +86 158 5410 3759
Website: http://haulynjason.net



On Thu, Jun 16, 2011 at 4:45 PM, Haulyn Jason <saharab...@domix.in> wrote:
> Hi, I am using Form, but I got the following error:
>
> Fatal error: Call to undefined method
> Yunshang\AccountBundle\Controller\DefaultController::createFormBuilder()
>
>
> My code is very simple, I do not know what's the problem.
>
>        $account = new Account();
>        $form = $this->createFormBuilder($account)
>                ->add('username', 'text')
>                ->add('email','text')
>                ->add("password","password")
>            ->getForm();
>
>        return 
> $this->render('YunshangAccountBundle:Default:register.html.twig',
> array(
>            'form' => $form->createView(),
>        ));
>
>
> Regards,
>
> Haulyn Jason
> Founder, http://domix.in
> Rm. 807, Qilu Software Tower, Qilu Software Park
> 1 Shunhua Rd., High-Tech Development Zone
> Jinan, Shandong 250101, P. R. China
> Tel: +86 158 5410 3759
> Website: http://haulynjason.net
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to