Trying to make a contact form example with symfony2

前端 未结 4 696
南笙
南笙 2021-02-10 10:27

Here I\'m trying to fill in a contact form then send it. However when I fill in the form and click on send I have this exception :

UndefinedMethodException: Atte         


        
相关标签:
4条回答
  • 2021-02-10 11:08

    bindRequest was deprecated and removed, use submit method instead

    0 讨论(0)
  • 2021-02-10 11:16

    Use $form->handleRequest($request); to handle form submissions - http://symfony.com/doc/current/book/forms.html#handling-form-submissions

    0 讨论(0)
  • 2021-02-10 11:21

    You should replace

    $this->form->bindRequest($this->request);
    

    With

    $this->form->bind($this->request);
    

    As bindRequest() has deprecated.

    0 讨论(0)
  • 2021-02-10 11:26

    You should replace

    $this->form->bindRequest($this->request);
    

    with

    $this->form->bind($this->request);
    

    as bindRequest() has been deprecated.

    0 讨论(0)
提交回复
热议问题