Home » HTML » HTML_QuickForm2 » Bug #5128
html attribute access to labels
Details
| Request #5128 | html attribute access to labels |
|---|---|
| Submitted | 2005-08-17 18:32 UTC |
| From | s dot schwardt at ispeicher dot de |
| Status | Wont fix |
| Package | HTML_QuickForm2 |
| PHP Version | 5.0.4 |
| OS | Lin |
| Roadmaps | (Not assigned) |
Comments
[2005-08-17 18:32 UTC] s dot schwardt at ispeicher dot de
Description:
------------
As IE isn't able to address certain elements specified by their attribute a xhtml dev has the following problem:
$form->addElement('radio', 'dummyn', null, 'dummyo', 'dummyv');
creates
"
<label></label>
<input name="dummyn" value="dummyv" type="radio" id="qf_a0ef98" />
<label for="qf_a0ef98">dummyo</label>
"
using css to format the labels like
"
label { float: left; display: block; width: 20em; }
"
will IE-result in
[ ][( )dummyo ]
The IE isn't able (yet and might never be...) to distinguish between the prefix-<label> and the radio-for-label using
"label[for]".
This is really annoying. Being able to access the attributes of the label-for would solve this problem. By now I extended the lable-creation in _radio and _checkbox to
"
$label = '<label for="' . $this->getAttribute('id') . '" class="IEradiolabel">' . $this->_text . '</label>';
"
which makes it for me as a workaround.