Project

General

Profile

Actions

Feature #72270

closed

Form name attribute with depth for complex use cases

Added by Philipp Rönsch over 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
Form Framework
Target version:
Start date:
2015-12-16
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
form, objects, depth
Complexity:
medium
Sprint Focus:

Description

I want to suggest this feature for tx_form to handle complex objects.
This requires a change to the handling of the name attribute of inputs.

The following should be possible:

FORM CONFIG:

prefix = tx_form
...
10 = TEXTLINE
10{
    name = object.property.subproperty
    label {
        value = Vorname
    }
}
...

HTML OUTPUT:
<input type="text" name="tx_form_form[tx_form][object][property][subproperty]" />

In the end this increases the versatility of tx_form, where complex forms could be handled by new/custom post processors.

The changes could could be made to:
- FormUtility->sanitizeNameAttribute(), where the . notation could be kept.
- HandleIncomingFormValues->handleIncomingFormValues, where the depth of the form values must be respected
- FormUtility/Element, could be extended to hold the full name, including prefix, for display accross all templates OR a ViewHelper for the name is added to all templates

Actions

Also available in: Atom PDF