Feature #2815

Support for objects as values in hidden fields

Added by Robert Lemke over 10 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Must have
Assignee:
Category:
-
Target version:
Start date:
2009-03-10
Due date:
% Done:

100%

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

Revision c5ac41a9 (diff)
Added by Robert Lemke over 10 years ago

  • 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 over 10 years ago

  • Target version set to 1.0.0 alpha 1

#2 Updated by Robert Lemke over 10 years ago

  • Branch changed from v4 to v5

#3 Updated by Robert Lemke over 10 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r2264.

Also available in: Atom PDF