Re: Re: QF tabbing order

From: Date: Mon, 06 Oct 2003 14:10:31 +0000
Subject: Re: Re: QF tabbing order
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-22404@lists.php.net to get a copy of this message
Jeroen Houben wrote:
Alexey Borzov wrote:
Hi! Jeroen Houben wrote:
yeah I know. I would have liked to see a renderer that gives the template designer more control. I personally think the form labels, stuff like sizes, style definitions (like class= and id=, or even style="") should all be dealt with in the template They're the designer's responsibility IMHO. I guess it's not hard to get the attribute string created by quickform and assign it to template vars. The designer could then so something like: <{$form.firstname.QF_attributes} tabindex="0" class="myclass" />{$form.firstname.error} or something like that..just an idea.
The idea is quite interesting. But there are lots of complications: this 'attributes' approach will work well for <input> elements, but what about <textarea>s and <select>s?
Him, Yes I know and I remember talking to Bertrand about this even before the renderers came to be in QF. I think selects and possibly other elements will need to be rendered differently. A for instance selectbox should look sometoihng like this. I'll just use PHP code, instead of templates for simplicity. Furthermore, mixing PHP and HTML can be nice sometimes IMHO :-) <select {$form.countries.QF_atttribs} style="color: pink;"> <option>I can easily add this as template a designer and need not bug the PHP developer for it...</option> <?foreach ($form['countries']['QF_options'] as $label => $value):?> <option value="<?=$value?>"><?=$label?></option> <?endforeach?> </select>
If someone could come up with a proof-of-concept implementation...
I've never looked into the internals of the Rendering mechanism, would creating a renderer that can do this be hard you think? jeroen Sorry, previous post still contained some Smarty code. Again:
<select <?=$form['countries']['QF_atttribs']?> style="color: pink;"> <option>I can easily add this as template a designer and need not bug the PHP developer for it...</option> <?foreach ($form['countries']['QF_options'] as $label => $value):?> <option value="<?=$value?>"><?=$label?></option> <?endforeach;?> </select>

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