[TYPO3-english] Hide a field in the backend without affecting default settings

Krystian Szymukowicz t33k.RE.MO.VE at RE.MO.VE.prolabium.com
Mon Nov 30 11:25:09 CET 2009


Jochem Nabuurs pisze:
> Sorry, something went wrong with submitting my question
> 
> The problem I have consists of the following:
> 
> I've created a usergroup (editors) which are allowed to edit all pages.
> They should also be able to create FE users.
> For this I've created the following pagestructure (sysfolders) which 
> contain the users.
> 
> + City
>     + City name 1
>     + City name 2
>     + City name 3
>     + City name 4
> 
> Upon creation, a usergroup is assigned to the user, depending on the 
> sysfolder in which it is located. This is done by adding 
> *TCAdefaults.tt_news.category = <usergroupid> *to the sysfolders page 
> TSconfig.A user is not allowed to have more than one usergroup assigned.
> 
>  From a usability point of view, what I'd like to do is restrict the 
> editors from being able to select a usergroup for a user. This is done 
> by default upon creation of a user so there is no need for editors do do 
> this.
> 
> I've tried hiding the usergroup field in the BE user registration form, 
> which you get when adding a new FE user, by adding the following to the 
> user TSconfig of the editors usergroup: 
> *page.TCEFORM.fe_users.usergroup.disabled = 1
> *
> Now, when I try to create a user under the editors account, the field is 
> hidden. So far so good.
> But when I want to log in under the account of the created user, it 
> won't work, because there is no usergroup assigned to the user.
> 
> Apparently, using the disabled setting in page TSconfig for the 
> usergroup field renders the TCAdefaults settings useless.
> I think this is because the field is physically removed, so it is not 
> available for BE processing.
> 
> *My question:*
> 
> Is there a way to hide the usergroup field for the editors usergoup 
> while retaining the possibility to set a default value per sysfolder 
> (with TCAdefaults f.e.)
> Limiting the number of choices in the usergroup selection box to 1 is 
> also an option, as is the disabling (grey out) of the selection items.
> Maybe this is possible with *TCEFORM.fe_users.usergroup.removeItems*, 
> but I haven't checked this yet.
> 

Try if extension "tcereadonly" will fit your needs.

As far as I know there is no possibility to completely hide and set 
defaults - so "readonly" is the only way to go.

--
grtz
Krystian Szymukowicz


More information about the TYPO3-english mailing list