[FLOW3-general] Form confusion

Julian Kleinhans kleinhans at bergisch-media.de
Fri Jan 28 17:10:53 CET 2011


Hi,

can u show us ur newAction method and the model ?

greetz
julian kleinhans



Am 28.01.11 10:00, schrieb Oliver Wand:
> Dear all,
>
> I am currently playing around with FLOW3 for the first time and a lot of
> things already work like charme.
>
> But I set up a form that is causing some confusion due to unclear
> flashMessages.
>
> Calling the form from newAction and the form looks like this:
>
> <f:flashMessages class="flashmessages"/>
> <f:form action="create" controller="Standard" package="Questions"
> object="{question}" name="question" method="post">
> <label for="questioner">Name</label><br />
> <f:form.textbox property="questioner" id="questioner" /><br />
> <label for="email">E-Mail</label><br />
> <f:form.textbox property="email" id="email" /><br />
> <label for="question">Question</label><br />
> <f:form.textarea property="question" rows="5" cols="40" id="query" /><br />
> <f:form.submit value="Submit question"/>
> </f:form>
>
> On submit the createAction is called but then remains on the form just
> stating this flash message:
>
> An error occurred while trying to call
> F3\Questions\Controller\StandardController->createAction()
>
> And the createAction looks like this:
>
>      /**
>       * Create action
>       *
>       * @param \F3\Questions\Domain\Model\Questions $question
>       * @return void
>       */
>      public function createAction(\F3\Questions\Domain\Model\Questions
> $question)
>      {
>          $this->questionsRepository->add($question);
>          $this->flashMessageContainer->add('You asked a new question!');
>          $this->redirect('index');
>      }
>
> Clearly I do overlook something but I don't get it... Even more the
> flash message to me is pretty unclear just giving a rather general error
> which doesn't help at all to debug and to understand what exactly is
> going wrong :)
>
> Any hints would be highly appreciated!
>
> Thanks,
>
> Oliver



More information about the FLOW3-general mailing list