HI!
I have a custom code action set in On Load that gets some date from a DB (that works according to echo and print_r in that action.
I set a variable $title in the code:
Then in a custom element I have this in the code section.
But the value in $title does not show. is there some setting I have wrong preventing the value from passing form custom code to the element?
I'm sure I'm missing something simple. A little help please.
I have a custom code action set in On Load that gets some date from a DB (that works according to echo and print_r in that action.
I set a variable $title in the code:
<?php
$query="SELECT ExhibitEntries.*,Title,Essay,InitialQty,InitialFee,MaxItemsPerEntry,ExhibitEntries.Exhibitid,InitPrice as CInitPrice,InitQty as CInitQty , case isnull(DRGMasters.uid) when 1 then 0 else 1 end as isamaster
FROM `ExhibitEntries` join Exhibits on ExhibitEntries.Exhibitid = Exhibits.Exhibitid
left join ExhibitCoupons on ExhibitCoupons.CouponID = ExhibitEntries.Couponid
left join DRGMasters on DRGMasters.uid=ExhibitEntries.cf_user_id
WHERE EntryID =".$form->data['entryid'];
//echo $query;
$db =& JFactory::getDBO();
$db->setQuery($query);
$entryRecord=$db->loadAssoc();
print_r($entryRecord);
$title=$entryRecord['Title'];
echo 'title:'.$title;
?>
Then in a custom element I have this in the code section.
<?php
echo 'title:'.$title;
?>
But the value in $title does not show. is there some setting I have wrong preventing the value from passing form custom code to the element?
I'm sure I'm missing something simple. A little help please.