Labels generated for SELECT boxes are incorrect. For example, on admin > settings :

 <label for="edit[error_level]">Error reporting:</label><br />
 <select name="edit[error_level]" id="edit-error_level">

Those [ should be - .

Comments

tangent’s picture

I do not see a #for attribute specified in the Forms API docs, nor in the code. I suspect this is a bug with the module creating the form. Can you describe a reproducible scenario for this bug?

m3avrck’s picture

tangent, check out the latest HEAD, it is wrong in admin > settings, along with wrong in my custom module. It it how the API creates the ... it generates the ID wrong from the form element.

m3avrck’s picture

oops that should have been:

<label for='[myformid]'>
<input type="text" id="my-form-id" />

This doesn't correctly transcribe the form id into the matching label for field. Nothing in a module touches this, it is completely up to the Forms API.

chx’s picture

Status: Active » Fixed

I fixed in Bryght SVN. Expect the form.inc patch soon.

Anonymous’s picture

Status: Fixed » Closed (fixed)