fudge4u
Member
I have a list in which I have a calc element {new_mcdc_orders___image} to link to an image in another list {new_mcdc_items___item_image}. The native image element is set to: Show media in form "cropped, then thumbnail, then full sized". But in the form with the calc element, the image only shows full size.
Is there a way to have the thumbnail show in the form that has the calc element?
Ideally, I would like the full size image to pop up in a new tab when clicked, but not necessary.
Here is the calculation element code:
$path = '';
$db = JFactory::getDBO();
$query = "SELECT item_image FROM new_mcdc_items WHERE item_name = " . $db->Quote('{new_mcdc_orders___item_to_order}');
$db->setQuery($query);
$path = $db->loadResult();
return "<img src=$path>";
Is there a way to have the thumbnail show in the form that has the calc element?
Ideally, I would like the full size image to pop up in a new tab when clicked, but not necessary.
Here is the calculation element code:
$path = '';
$db = JFactory::getDBO();
$query = "SELECT item_image FROM new_mcdc_items WHERE item_name = " . $db->Quote('{new_mcdc_orders___item_to_order}');
$db->setQuery($query);
$path = $db->loadResult();
return "<img src=$path>";