How can I retrieve the “item name” from a dropdown field (i.e. the way the field is stored in the database) in order to use it in a conditional statement in a logic hook?
I want to be able to change the display label of enum items without my code breaking!
All dropdown lists are stored in a global variable called $app_list_strings. In order to access the dropdown values you’ll have to use something like
$app_list_strings ['bug_priority_dom']
where ‘bug_priority_dom’ will be the name of your dropdown list.
1 Like
ok, so I’d match my field entry with the $app_list_strings array using array_search()? I guess that would work.
If you are inside a function remember to declare $app_list_strings as a global variable:
global $app_list_strings;
1 Like