I am trying to use a EasyProfile field value for a user to populate a contact form if logged in.
The contact from accepts PHP/SQL in the default value for the field, that looks like this:
//<code>
$db = JFactory::getDbo();
$db->setQuery("SELECT `column_name` FROM `#__table_name` WHERE `column_name`='value' LIMIT 1");
return $db->loadResult();
//</code>
Can you help me modify this example code above to pull a users value for the a particular user field and display the text/title (not the database value) for that field in the front end of my form?
I have coded all my values for 'province' in EasyProfile to have a number. But I obviously want to display the actual text for that value in the contact form, not the database value.
Jordan