Re: Quickform, Controller, Renderer and Templates

From: Date: Tue, 27 Apr 2004 08:28:57 +0000
Subject: Re: Quickform, Controller, Renderer and Templates
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-12154@lists.php.net to get a copy of this message
Hi there, thanks for taking the time to answer. On Tue, 2004-04-27 at 16:49, Alexey Borzov wrote: > Dario wrote: > > All my attempts of using a static template, such as Sigma+ITStatic, have > > produced no output. I am pretty sure my code has bugs so I would > > appreciate a working example to learn from... > > The only *new* problem Controller adds is rendering of the auto-named buttons. > But this has nothing to do with "no output". > > Did you try just taking the ITStatic example from QF and reworking it? > Did you try setting the PEAR error handling mode so that you'll be able to see > the errors? I did add: PEAR::setErrorHandling(PEAR_ERROR_DIE); to display errors, but got none. I used existing examples with Sigma+ITStatic and they work. I can't make it work with QuickForm_Controller. Example With the upload.php example provided with the Controller (no changes to the template), I changed the _renderForm method like so: $tpl =& new HTML_Template_Sigma('./templates'); $tpl->loadTemplateFile('uploadS.tpl.html'); $renderer =& new HTML_QuickForm_Renderer_ITStatic($tpl); $renderer->setRequiredTemplate('{label}<font color="red" size="1">*</font>'); $renderer->setErrorTemplate('<font color="red">{error}</font> <br />{html}'); I believe the names in the template don't match with those generated by the Controller and I can't figure out the naming convention. e.g.: I couldn't find in the documentation that elements must be named form_element as in myform_radio where myform is the form name given to QF. I realise I'm out of my depth here... but I have to start somewhere... :) Thanks again. > >

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