Project

General

Profile

Actions

Bug #20510

closed

Extbase/Fluid does not support to fill an array from formular's text-fields

Added by Marcel Rosenberger over 15 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2009-05-27
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If you have a class that has an array as a property you cannot create the array's elements from multiple formular's textfields.

Sample:

--- Model ---

class Tx_MyExt_Domain_Model_Myclass extends Tx_Extbase_DomainObject_AbstractEntity {
/*
  • @var array
    */
    protected $myarray;
    [...]
    }

--- Fluid Template ---

<f:form method="post" controller="Mycontroller" action="create" name="newMyclass" object="{newMyclass}">
<f:for each="{newMyclass.myarray}" as="arrayelement">

&lt;f:form.textbox property=&quot;arrayelement&quot; /&gt;
&lt;f:form.textbox name=&quot;newMyclass[arrayelement[]]&quot; value=&quot;{arrayelement}&quot; /&gt;
&lt;f:form.textbox name=&quot;newMyclass[arrayelement][]&quot; value=&quot;{arrayelement}&quot; /&gt;
&lt;/f:for&gt;
&lt;/f:form&gt;

Neither Test (1) nor Test (2) nor Test (3) is not working. The error shown is:

Fatal error: Class 'array' not found in C:\project_a\t3lib\class.t3lib_div.php on line 4794

(issue imported from #M11196)

Actions

Also available in: Atom PDF