The whole point of a <label> tag, is to label a specific input field. So there would be no reason to implement a feature to omit the tag in any framework.

I can't tell you if it is possible or not, however I would advice that if you have a need to remove the for attribute from the label, you should try and rethink your html.

/Emil



On 09/05/2010, at 21.32, euromark <[email protected]> wrote:

i dont think the "for" element should be omitted for labels
as it is part of it - there are lots of other xhtml elements that
would be more appropriate if there is no id to refer to


On 9 Mai, 20:21, Zaky Katalan-Ezra <[email protected]> wrote:
I use <th> for column headers, thank you.
But this wasn't my question.
How do I omit the automated 'for' attribute for the $this->Html- >label.

On Sun, May 9, 2010 at 1:01 AM, Andy Dirnberger
<[email protected]>wrote:



Labels are supposed to be used with input fields. You should be using
<th> for table column headers.

On May 8, 4:13 pm, ZAky <[email protected]> wrote:
I am trying to omit the auto generated  'for' attribute for
$this->Html->label with no success.

I tried:
$this->Form->label('status','Status',array('for'=>false [or] null));

and this

$this->Form->label('status','Status',array('label'=>array ('for'=>false
[or] null)));

Just using <?php echo $this->Form->label('status');?> produce
<label for="status">Status</label>
When I use it for table columns header I have no element with
id="status".
The W3C Validation Service also arise a warning about it.

Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others
with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]<cake-php %[email protected]>For more options, visit this group athttp://
groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]<cake-php %[email protected]>For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en

--
Regards,
Zaky Katalan-Ezra
QA Administratorwww.IGeneriX.com
Sites.IGeneriX.com
054-7762312

Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to