[FLOW3-general] Access fluid form object
Thomas Plessis
t.plessis at totemnumerique.com
Wed Jan 11 10:53:11 CET 2012
Action like that, with many validations :
/**
* Adds the given new item object to the item repository
*
* @param \Totem\Lewin\Domain\Model\Item $newItem A new item to add
* @return void
*
* @FLOW3\Validate(value="newItem.price", type="\Totem\Lewin\Validation\Validator\PriceValidator")
* @FLOW3\Validate(value="newItem.pictures[0].originalResource", type="\Totem\Lewin\Validation\Validator\PictureValidator")
* @FLOW3\Validate(value="newItem.zipCode", type="\Totem\Lewin\Validation\Validator\ZipcodeValidator")
*/
public function createAction(Item $newItem) {
Thomas Plessis
Développeur multimédia
--
TOTEMnumerique
9, Place St Étienne
31000 Toulouse
T. 05 61 14 64 54
F. 05 61 14 64 55
Le 11 janv. 2012 à 10:33, Thomas Plessis a écrit :
> Hi guys,
>
> I've a form for creating a new object (NOT updating). After submitting form, in case of a wrong validation, i want to display value of a textfield in a part of the page. But how to access values of the submitting form object?
> My form looks like:
>
> <f:form action="create" name="formItem" object="{newItem}" enctype="multipart/form-data" id="grands_formulaires">
> <label for="title">Titre</label><br />
> <f:form.textfield property="title" id="title" size="40" required="required" /><br />
> Title = {newItem.title}
> <f:form.submit value="Publier" class="bt_envoyer" />
> </f:form>
>
> but {newItem.title} display nothing… :/
>
> regards,
>
> Thomas Plessis
> Développeur multimédia
> --
> TOTEMnumerique
> 9, Place St Étienne
> 31000 Toulouse
> T. 05 61 14 64 54
> F. 05 61 14 64 55
>
> _______________________________________________
> 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