Populate a field with ZOO CCK product name

mat 21 Jan, 2011
If somebody needs, here is how I get as hidden value field of a ZOO product item (I use Chronoforms plugin in the product pages).

<input name="productname" type="hidden" value="<?php
$idprod = JRequest::getString('item_id', '', 'get');
$database->setQuery( "SELECT name FROM #__zoo_item WHERE id='".$idprod."'" );
$productname = $database->loadResult();
echo $productname;
?>">

The code is based on those posts:
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&p=56269#p56269
and
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&p=55164#p55164
Max_admin 24 Jan, 2011
Thanks for sharing!🙂

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.