[TYPO3-dev] Hide flexform field with typoscript in TSconfig

Steffen Kamper info at sk-typo3.de
Mon Mar 23 14:56:46 CET 2009


Hi,

Martin Kutschker schrieb:
> Steffen Kamper schrieb:
>> Hi Masi,
>>
>> Martin Kutschker schrieb:
>>> Steffen Kamper schrieb:
>>>> Hi Masi,
>>>>
>>>> Martin Kutschker schrieb:
>>>>>> TCEFORM.tt_content.pi_flexform./ROOT/el/what_to_display.disabled = 1
>>>>> Does this work with sections? IIRC that was one of Dmitry's concerns.
>>>>>
>>>> it could work with sections. But it doesn't make sense to configure one
>>>> array element in a section this way.
>>> I don't use them, so I wouldn't know ;)
>>>
>>> As for the syntax. Do we need the ROOT? Shouldn't we have the sheet
>>> instead?
>>>
>>> TCEFORM.tt_content.pi_flexform./sheetname/el/fieldname.disabled = 1
>>>
>>> Or even simpler:
>>>
>>> TCEFORM.tt_content.pi_flexform.sheetname/fieldname.disabled = 1
>>>
>>>
>> i looked to some existing flexforms, sheets are optional (structure can
>> start with ROOT/el).
>> So i simply followed the path of the XML tags
>> The beginning slash can be omitted, but could be used as "starting from
>> root" and as identifier of upcoming xpath.
>>
>> simplifying the syntax would add complexity to parsing, so i'm fine with
>> any syntax that works exact the way it should.
> 
> I'm not so familiar with XPath. A real/full XPath should of course work.
> Only if that is cumbersome we should consider an abbreviated form.
>

have a look here, xpath is fully supported by native php (should be 
tested with pi_flexform data)
http://www.php.net/manual/en/function.simplexml-element-xpath.php


> What might be a problem is that the flexform fields support the loading
> of different definitions by type and subtype of the record. In theory
> the same XPath could match for different forms. This may or may not been
> intended by the site admin. So I think that it mus be possible to tie an
> XPath to the correct (sub)type of the record.
> 
> Masi

this shouldn't be the case or it's wrong by design. Fields should always 
be unique by name, even if there is type/subtype condition.

vg Steffen




More information about the TYPO3-dev mailing list