Re: [ANNOUNCEMENT] HTML_QuickForm-2.2 (stable) Released.
| From: | David Dahl | Date: | Thu, 13 Jun 2002 17:24:52 +0000 |
| Subject: | Re: [ANNOUNCEMENT] HTML_QuickForm-2.2 (stable) Released. | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-1655@lists.php.net to get a copy of this message | ||
I thought i would customize the way QuickForm displays forms with CSS by subclassing the HTML_QuickForm class. This does not output anything to the browser, i am using the example in quickform for testing...
is there an easier way to customize the look with CSS?
<?PHP
require_once ("HTML/QuickForm.php");
class CSS_QuickForm extends HTML_QuickForm {
//Override html style of the table with CSS
var $trBgColorHeader;
var $_requiredNote = "<span class=cssQuickFormRequiredError>* denotes required field</span>";
var $_headerTemplate =
"\n\t<tr>\n\t\t<td nowrap=\"nowrap\" align=\"left\" valign=\"top\" colspan=\"2\" bgcolor=\"$trBgColorHeader\"><b>{header}</b></td>\n\t</tr>";
var $_elementTemplate =
"\n\t<tr>\n\t\t<td align=\"right\" valign=\"top\"><!-- BEGIN required --><span class=cssQuickFormRequiredErrorBold>*
<!-- END required -->{label}</span></td>\n\t\t<td nowrap=\"nowrap\" valign=\"top\" align=\"left\"><!-- BEGIN error --><span class=cssQuickFormRequiredError>{error}</span><!-- END error -->\t{element}</td>\n\t</tr>";
var $_formTemplate =
"\n<table border=\"0\">\n\t<form{attributes}>{content}\n\t</form>\n</table>";
var $_requiredNoteTemplate =
"\n\t<tr>\n\t\t<td></td>\n\t<td align=\"left\" valign=\"top\">{requiredNote}</td>\n\t</tr>";
}
?>
On Wednesday, May 29, 2002, at 06:11 AM, PEAR Announce wrote:
* Template-like form elements customization...