[TYPO3-english] How to hide fields in BE forms from extensions for all users ?

Christoph Stadler christophe at stadler.com
Tue Nov 30 19:15:58 CET 2010


hello all,

i am working with the extension realty but my question is more of a 
general nature, i'd like to do this for a variety of plugins.

The extension provides many input and selection fields that i don't use 
and clutters up the input form when a user creates a new record or edits 
an existing one.

What i'd like to do is simply to hide these items. I don't want to 
delete them since i might choose to use these items/options in the future.

How do i do this ?

I spent some time RTFM and the only tip i've found is to do this by 
modifying the TCA.

So i browsed to the tca variable:

$TCA['tx_realty_objects']['interface']['showRecordFieldList'] = 
'sys_language_uid,l18n_parent,l18n_diffsource,hidden,starttime,endtime,object_number,object_type,title,sorting,emphasized,show_address,street,zip,city,district,country,number_of_rooms,living_area,total_area,estate_size,rent_excluding_bills,extra_charges,heating_included,deposit,provision,usable_from,buying_price,hoa_fee,year_rent,rented,apartment_type,house_type,floor,floors,bedrooms,bathrooms,heating_type,has_air_conditioning,garage_type,garage_rent,garage_price,pets,construction_year,old_or_new_building,state,balcony,garden,elevator,barrier_free,assisted_living,fitted_kitchen, 
has_pool,has_community_pool,teaser,description,equipment,layout,location,misc,details_page,images,employer,openimmo_anid,openimmo_obid,utilization,contact_data_source,contact_person,contact_email,contact_phone,owner,language,currency,exact_coordinates_are_cached,exact_longitude,exact_latitude,rough_coordinates_are_cached,rough_longitude,rough_latitude,advertised_date';

modfied it by removing the fields i don't want:

$TCA['tx_realty_objects']['interface']['showRecordFieldList'] = 
'sys_language_uid,l18n_parent,l18n_diffsource,hidden,starttime,endtime,object_number,object_type,title,sorting,emphasized,show_address,street,zip,city,district,country,number_of_rooms';

and pressed the 'Write value to configuration file' button

i checked in the extTables.php file and there is now an entry:

$GLOBALS['TCA']['tx_realty_objects']['interface']['showRecordFieldList'] 
= 
'sys_language_uid,l18n_parent,l18n_diffsource,hidden,starttime,endtime,object_number,object_type,title,sorting,emphasized,show_address,street,zip,city,district,country,number_of_rooms,living_area,total_area,estate_size,rent_excluding_bills,extra_charges,heating_included,deposit,provision,usable_from,buying_price,hoa_fee,year_rent,rented,apartment_type,house_type,floor,floors,bedrooms,bathrooms,heating_type,has_air_conditioning,garage_type,garage_rent,garage_price,pets,construction_year,old_or_new_building,state,balcony,garden,elevator,barrier_free,assisted_living,fitted_kitchen,has_pool,has_community_pool,teaser,description,equipment,layout,location,misc,details_page,images,utilization,language,currency,exact_coordinates_are_cached,exact_longitude,exact_latitude,rough_coordinates_are_cached,rough_longitude,rough_latitude,advertised_date';

i cleared all caches and temp files but the fields are still all 
displayed in the form editor of all new and existing records.

I also added the line:

$typo_db_extTableDef_script = 'extTables.php';

to localconf.php

probably i missed something obvious and/or missed some relevant part of 
the documentation, i'd be thankfull not only for a solution but for 
links to documentation i should read to understand this issue, i read 
through everything online many time but still can't find where to look 
for this

cheers


More information about the TYPO3-english mailing list