Re: Quickform: requiredtemplate issues

From: Date: Tue, 17 Jun 2003 15:42:19 +0000
Subject: Re: Quickform: requiredtemplate issues
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-17543@lists.php.net to get a copy of this message
Another issue is not so easy to solve. I like to leave form labels out of my PHP code, because I think form labels belong to the template. Moreover, my PHP code drives several sites which all look different because I'm using different Smarty templates. I would also like to have different form labes for different sites. Problem is, $renderer->setRequiredTemplate doesn't work if you don't use label in the PHP code (AFAIK).
I found something that works. If my required_template looks like this: {$html} {if $required} <span class="form_required">*</span> {/if} I now don't need a {$label} variable anymore but use {$html} instead. I prefer having an asterix after the form elements (as opposed to after the label) anyway and now I can leave the labels in my template files :-) jeroen

« previous php.pear.dev (#17543) next »