Re: Quickform: static type needs colspan

From: Date: Thu, 27 Feb 2003 00:23:15 +0000
Subject: Re: Quickform: static type needs colspan
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-3985@lists.php.net to get a copy of this message
Quoting Bertrand Mansion <bmansion@mamasam.com>: > You can also try to give a name to your static element and then call > setElementTemplate('html with colspan', $staticElementName); Ok... this seems to work: if (!empty($reason)) { $reason = '<div style="color: red">' . $reason . '</div>'; $form->addElement('static', 'reason', '', $reason); $form->setElementTemplate('<tr><td colspan="2">{element}</td></tr>', 'reason'); } else { $form->addElement('static', 'label', '', 'Please login to access the develoment status report'); $form->setElementTemplate('<tr><td colspan="2">{element}</td></tr>', 'label'); } Thanks, -Dan

« previous php.pear.general (#3985) next »