Alex Buell wrote:
Yeah, but I'm doing this by adding elements to the Zend_Form which I've
designed. There has to be a way to add an element like the above!
On further thoughts, perhaps I haven't explained my problem properly.
See,
here's my code:
$newResellerForm = new Zend_Form($newResellerFormArray);
$resellerSql = "SELECT * FROM resellers ORDER BY name";
$resellerArray = $GLOBALS["db"]->fetchAll($resellerSql,
$resellerArray["id"]);
$resellersForm = new Zend_Form();
$resellersForm->setMethod("post");
$resellersSubForm = new Zend_Form_SubForm();
$items = 0;
foreach ($resellerArray as $reseller)
{
$id = $row["id"];
$resellerRow = new Zend_Form_SubForm();
$resellerRow->addElement(
"text",
"name_{$items}",
array(
"size" => "40",
"value" => $reseller["name"]));
$resellerRow->addElement(
"text",
"notes_{$items}",
array(
"size" => "40",
"value" => $reseller["notes"]));
*** Here, I want to do echo $reseller["updated"] ***, but don't want
this
to be an input box or anything else ***
$resellerRow->addElement(
"checkbox",
"active_{$items}",
array(
"value" => $reseller["active"]));
$resellerRow->addElement(
"checkbox",
"delete_{$items}",
array(
"value" => "0"));
$resellerRow->setElementDecorators(array(
"ViewHelper",
"Errors",
array("HtmlTag", array("tag" => "td")),
));
$resellersSubForm->addSubForm($resellerRow, $items);
$items++;
}
-----
Regards,
Alex