In SugarCRM 7.x PDF Template created using PDF Manager i want to retrieve the key of a dropdown field for checking some conditions. What is the best way to retrieve this key?
Let's consider that I have a dropdown field named 'my_field' which have a custom options list named 'my_options' attached to it.
The options list 'my_options' attached with 'my_field' is defined like this:
$app_list_strings['my_options']=array ( 'a' => 'Option Alpha', 'b' => 'Option Bravo', 'c' => 'Option Charlie', );
Lets also consider that in my module 'my_field' has a value of 'b' saved in database and in my pdf template i want to retrieve this value 'b' so in pdf template i use
and it returns 'Option Bravo'
Is it possible to retrieve its key value i.e. 'b' in some way ?