[TYPO3-mvc] Passing non-property fields in forms

Christine Gerpheide cgerpheide at gmail.com
Wed Feb 17 13:15:50 CET 2010


Hello list,

I am wondering how to pass non-property fields in a form (which would later
be used to set a property in the object).  For instance, I have a form to
schedule a Campaign for delivery, where the user can select "now" or "later"
and input a date/time.  The form passes the Campaign object using the
arguments="{campaign : campaign}" attribute, and then I want to pass for
instance the value of a radio button indicating they want it delivered
"now".  Then in the action you come to, I would notice the value of that
variable, and set the blastdate of the Campaign to the current time using
setBlastdate().

So I'm trying to figure out how to write these form fields that are not real
properties of an object, and still have access to them in the receiving
action.  My guess was something like this:

 <f:form method="post" action="deliver" arguments="{campaign : campaign}">

<f:form.radio name="tx_myext_pi1[scheduleMode]" value="now" />
<f:form.radio name="tx_myext_pi1[scheduleMode]" value="later" />

<f:form.submit class="submit" value="Deliver Campaign"/>
</f:form>


But I can't seem to retrieve the values of these fields like this (with
print_r($_GET) ).  I also tried with other "name" attributes like just
"scheduleMode" but that didn't seem to work either.

Any nice way to do this?
Christine


More information about the TYPO3-project-typo3v4mvc mailing list