[TYPO3-english] Using DisplayCond in flexform on "settings.xxx" fields

Jigal van Hemert jigal.van.hemert at typo3.org
Thu Apr 10 12:28:28 CEST 2014


Hi,

On 9-4-2014 14:44, Daniël van der Weerd wrote:
> I'm trying to add a DisplayCond to a flexform sheet, on a field that has
> a dot in its name:
>
> <displayCond>FIELD:main.settings.mySetting:=:1</displayCond>
>
> This isn't working. Doing some research in core code (v6.1.7), I found
> the reason in TYPO3\CMS\Backend\Form\FormEngine line 2675:
>
> case 'FIELD':
>          list($sheetName, $fieldName) =
> \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('.',
> $splittedCondition[1]);
>
> Since the condition is exploded by a dot delimiter, the field
> 'settings.mySetting' will become 'settings', which is obviously not what
> I intend.
>
> How to achieve the desired result?

As you've seen the dot is used as the separator between sheet name and 
field name. You can make it work by using field names without dots.

-- 
Jigal van Hemert
TYPO3 CMS Active Contributor

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-english mailing list