[TYPO3-dev] removing items from flexform selectfield

Franz Koch typo3.RemoveForMessage at elements-net.de
Tue Mar 30 15:48:12 CEST 2010


Hi again,
> is there by now a way to remove items from a flexforms selectfield via
> pageTS/userTS? I found the extension "sp_betterflex" which at least
> allows to remove fields completely based on BEusers rights, but I
> haven't found a way to manipulate the TCEform items via TS (I try to
> limit the allowed views of a extension for certain users).
>
> There was already a discussion about this with possible solution using
> XPATH about a year ago - any progress or solutions in the meantime?
> I searched the web and TSrefs and had a short look at the sourcecode but
> haven't found anything so far.

yay, found a way to solve the issue. I was able to use a hook in 
TCEforms->getSingleField_SW (hook: getSingleField_beforeRender) to set 
the needed pageTS/userTS for the flexform fields. But unfortunately 
XPATH didn't work out as the TSparser of TYPO3 doesn't seem to like / or 
\ in TS keys - so I used the tradition dot-syntax to build up the paths:

TCEFORM.tt_content.pi_flexform.sDEF.fieldName.removeItems = foo,bar

for now it doesn't support different types/plugins - but the way it's 
working is enough for me ATM.

-- 
kind regards,
Franz Koch




More information about the TYPO3-dev mailing list