Re: QuickForm elements not displaying

From: Date: Thu, 03 Apr 2003 08:32:23 +0000
Subject: Re: QuickForm elements not displaying
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-4608@lists.php.net to get a copy of this message
<i.pople@unimelb.edu.au> wrote : > Hi, > > I have been having some problems with some Quickform elements not > displaying. Specifically in the following code, the date and imageFile > components do not appear. I have found that changing the order of the > elements can affect whether they appear or not. > > QuickForm 2.10 > Pear 1.0 > PHP - 4.1.2 > Apache 1.3.26 > > Has anyone else experienced this? Any suggestions? > > cheers, Iain. > > > $newsForm = new HTML_QuickForm('newsForm','POST','new.php'); > // Add Elements > $newsForm->addHeader('1. Title Information:'); > > $newsForm->addElement('text','title','Title:','size = > 32'); Attributes should be set like this: 'size=32' or like this: Array('size' => 32) > > $newsForm->addElement('select','publicationType','Publication > Type:',$pubTypes); > > > $newsForm->addElement('select','topic','Topic:',$topics,'multiple > = true'); 'multiple=multiple' (this is xhtml) or array('multiple' => 'multiple') > $newsForm->addElement('date','dateStamp','Date:'); > > $newsForm->addHeader('2. Document:'); > $newsForm->addElement('text','byline','Introduction > Text:','size = 60'); > $newsForm->addElement('file','imageFile','Image:'); > > $newsForm->addElement('textarea','document','Document:','cols > = > 65, rows = 22'); > > $newsForm->addElement('text','caption','Caption:','size = > 60'); > > $newsForm->addHeader('3. Contact Information:'); > $newsForm->addElement('text','email','Contact > Information:','size = 32'); > > $newsForm->addElement('textarea','contact','Contact:','cols = > 45, rows = 6'); 'cols=45 row=6' (no comma) or array('col' => 45, 'row' => 6) > $newsForm->addElement('submit','submit','Submit'); > // Add validation Rules > > $newsForm->display(); > Bertrand Mansion Mamasam

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