[FLOW3-general] Fluid - How to add checkbox of type boolean
Florian Kugler
mail at floriankugler.de
Sun Nov 28 13:17:49 CET 2010
Hi Mick,
AFAIK you have to adapt the setCompleted method in your Task model to accept a string input and check if it evaluates to true or false. FLOW3 does not do the to boolean conversion job for you. This also applies e.g. to ints and floats.
Good luck :)
Florian
On 28.11.2010, at 12:46, Mick wrote:
> Hi all,
>
> i have a question about adding checkbox to a fluid form.
>
> The checkbox looks like:
>
> <f:form action="update" object="{task}" name="task" enctype="multipart/form-data">
> <f:form.checkbox name="completed" property="completed" value="true" checked="checked"/>
> <f:form.submit value="Submit task list"/>
> </f:form>
>
> The model look like:
> see attachement: Task.php
>
>
> After submitting the form i got the following Exception:
> Uncaught Exception in FLOW3
> #1244465559: Expected property of type boolean, but got string for F3\GTasks\Domain\Model\Task::completed (More information)
>
> F3\FLOW3\Persistence\Exception\UnexpectedTypeException thrown in file
> Packages/Framework/FLOW3/Classes/Persistence/Backend/AbstractBackend.php in line 541.
>
>
> How should i setup the form correctly to get the boolean value into the model?
>
> Cheers,
> Mick
>
> _______________________________________________
> FLOW3-general mailing list
> FLOW3-general at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general
More information about the FLOW3-general
mailing list