[FLOW3-general] non model fields in form
Wasko Jugovic
mailtestler at web.de
Wed Aug 8 13:06:39 CEST 2012
Hi,
Is it possible to have fields from a model together with some custom fields
(non-db) in one form?
How can I get the value of such a custom field in my controller?
e.g.: I have a form with a field "name" from model User. Besides there is a
field "custom" which I want to access in my UserController's createAction.
Template:
<f:form action="create" name="newUser" object="{newUser}">
<f:form.textfield property="name" id="name" />
<f:form.textfield id="custom" name="custom"/> // ??
<f:form.submit value="Create"/>
</f:form>
Controller:
/**
* @param \XY\Package\Domain\Model\User $newUser A new user to add
* @return void
*/
public function createAction(\XY\Package\Domain\Model\User $newUser) {
if ( $custom == "somevalue") //??
{....
}
}
thx
More information about the FLOW3-general
mailing list