[TYPO3-core] RFC: Flexform "field path" patch

Bernhard Kraft kraftb at kraftb.at
Sun Oct 2 14:29:57 CEST 2005


Hallo,

This is a CVS patch request.

Type: Bugfix

Description:
If you use an <itemsProcFunc> for generating the elements of an 
<type>select</type> field and those items shall depend on the value of 
another field in the flexform then you get the problem that the 
<itemsProcFunc> doesn't know which flexform-field it renders actually. 
Of course you have the name of the field - but if you use a flexform 
with sections (variable number of sub-elements/containers) then you 
can't know in which section you are actually.

I made two patches to correct this. The first one is simpler but you 
will have to parse the passed "formPrefix" string in your itemsProcFunc 
to find out the path of the field in the flexform.

The second one keeps track of the actual path in the flexform as an 
array and uses this as argument to the itemsProcFunc.

Branches:
HEAD
TYPO-3.8

Files:
01_flexField_path_patch.diff : The one collecting the path as string 
(uses existing variable)
02_flexField_path_patch.diff : Collects the path as an array

Which one is the better would need to get decided. I'm in favour of 02_ 
because ONLY the path of the element through the flexform i.e:
Array
(
     [0] => data
     [1] => criteria
     [2] => lDEF
     [3] => field_criteria_container
     [4] => el
     [5] => 2
     [6] => field_criteria
     [7] => el
     [8] => field_field
     [9] => vDEF
)

note "[5] => 2" ... this is the second container in the section 
field_criteria_container (should get named _section)


greets,
Bernhard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 01_flexField_path_patch.diff
Type: text/x-patch
Size: 2501 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20051002/11e3a199/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 02_flexField_path_patch.diff
Type: text/x-patch
Size: 4449 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20051002/11e3a199/attachment-0001.bin 


More information about the TYPO3-team-core mailing list