[TYPO3-mvc] use object-data in formhandler
Sebastian Schreiber
me at schreibersebastian.de
Thu Jul 21 22:01:21 CEST 2011
Hi Johannes,
i think the easiest way to achieve it, is to use the cObjectViewHelper.
Pass your object as the data parameter and use the preProcessors
settings of the formhandler.
Example:
Fluid-Template:
<f:cObject typoscriptObjectPath="lib.formhandler" data="{entry}"
currentValueKey="title" />
Your TS
lib.formhandler < plugin.tx_formhandler_pi1
lib.formhandler.settings {
templateFile = fileadmin/formhandler/template.html
preProcessors {
1.class = Tx_Formhandler_PreProcessor_LoadDefaultValues
1.config {
1 {
firstname.defaultValue = TEXT
firstname.defaultValue.field = title //
Could be any accesible property of your domain model
}
}
}
}
Good luck.
Am 21.07.2011 20:09, schrieb Johannes C. Schulz [EnzephaloN IT-Solutions]:
> Formhandler is extension that followed mailform plus.
> If I add a formfield to my fluid-template, its outside of the fieldset which is generated by formhandler. So it will not be processed.
> Any other ideas?
>
>
> Johannes C. Schulz
>
> Von Samsung Mobile gesendet
>
> Pankaj Lele<pankaj at lelesys.com> hat geschrieben:
>
>> Hello Johannes,
>>
>>> Now I try to get an onject-data (like item.name) into a
>>> formhandler-input-field.
>> Not sure what the formhandler-plugin means. However if you looking for
>> showing the object inside a form you can try following in the Fluid
>> template of single view:
>>
>> <f:form name="myForm" action="someAction" object="{item}">
>> <f:form.textfield property="name" />
>> </f:form>
>>
>> So in place of the line 2 above, you will see a text input with the
>> value from item.name filled in.
>>
>> Hope that helps.
>>
>>
>> --
>>
>> With best regards,
>> Pankaj Lele
>> ---------------------------
>>
>> CTO& Executive Director
>> Lelesys Infotech Pvt. Ltd.
>> Pune/Goa, India
>>
>> Web: http://www.lelesys.com
>>
>> [Certified TYPO3 Integrator]
>> _______________________________________________
>> TYPO3-project-typo3v4mvc mailing list
>> TYPO3-project-typo3v4mvc at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>>
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
--
Sebastian Schreiber
(Medieninformatiker)
(TYPO3 Certified Integrator)
Sülzburgstraße 36
D-50937 Köln
T 0221 677 88 541
M 0176 431 05 790
Skype schreibersebastian.de
me at schreibersebastian.de
www.schreibersebastian.de
Steuernummer: 219 / 5302 / 2302
More information about the TYPO3-project-typo3v4mvc
mailing list