How to hide several choises in droplist

Hello,

I need to hide several options of drop-down list for entering new tasks (while choosing task type). I can’t remove these unneccessary tasks types at all because I need to be able to search for a previously entered tasks.

F.e. I have 4 task types:

  1. To make a phone call
  2. To send an email
  3. To send a fax
  4. To send an sms

And now while making new records to CRM tasks module I need to be able to choose only 2 and 4. But 1 and 3 are needed only for filtering (search) possibility to find these task types that were entered previously. Is it possible to hide unneeded types?

CRM v 7.10.5
Sugar v 6.5.25 (build 344)

HI

Please check Admin / Dropdown editor

You’ll have to fnid out which list it is, but if you search based on “task” it should be easy to spot.

Hi,

I found the name of this list. But I can’t remove all unnecessary items of this lists’, because I need to have possibility to make reports with all the records. Now I only need to hide some of them for entering new records, but at the same moment I need to be able to filter all previously entered records.

Hi,

Here are the steps to achieve that:

  • Duplicate your list and remove in that duplicate the keys you don’t need
  • edit the editviewdefs of that module (in custom/modules/YOURMODULE/metadata if that’s a core module)
    In the array where you find your dropdown field, adapt and add the following:

            'customCode' => '{php}$this->_tpl_vars["source_options"] = $GLOBALS["app_list_strings"]["name_of_your_duplicated_list"];{/php}{html_options name="your_field_name" id="your_field_name" options=$source_options selected=$fields.your_field_name.value}',

2 Likes