Feature #2815
Support for objects as values in hidden fields
Status: | Resolved | Start date: | 2009-03-10 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | Robert Lemke | % Done: | 100% |
|
Category: | - | |||
Target version: | 1.0.0 alpha 1 | |||
Has patch: |
Description
Currently only types which can be casted to string are support as values in hidden form fields. However, it should be possible to use (domain) objects as values:
<f3:form method="post" action="create" object="invoice"> <f3:form.textbox name="properties[title]" property="title" /> <f3:form.textarea name="properties[description]" property="description" /> <f3:form.hidden name="properties[customer]" value="{customer}" /> <f3:form.submit>Create Invoice</f3:form.submit> </f3:form>
Internally Fluid would convert the object into an identity array (not clear yet, if / when it becomes array('__uuid' => '1234...') or array('__identity' => array('title' => 'the title', 'number' => 234)) which then is converted back to an object by FLOW3's MVC framework on processing the request after the form has been submitted.
Associated revisions
- Fluid: Added support for automatic conversion of objects into identity arrays in the AbstractFormViewHelper. That means you can pass an object as a value to an Hidden field view helper and this view helper will convert the object to a uuid which is rendered into the HTML form. Resolves #2815
History
#1 Updated by Robert Lemke about 6 years ago
- Target version set to 1.0.0 alpha 1
#2 Updated by Robert Lemke about 6 years ago
- Branch changed from v4 to v5
#3 Updated by Robert Lemke about 6 years ago
- Status changed from Accepted to Resolved
- % Done changed from 0 to 100
Applied in changeset r2264.