All the tags, including the id tag, contain spurious information e.g. "edit-submited". This module would produce much more useful results if this problem was rectified. Here is the code that the webform module generated for a textfield called "mytextfield".


<div class="form-item">
 <label for="edit-submited][mytextfield">mytextfield:</label><br />
 <input type="text" maxlength="30" class="form-text" name="edit[submited][mytextfield]" id="edit-submited][mytextfield" size="30" value="This is the default value." />
 <div class="description">This is the description.</div>
</div>

Comments

ullgren’s picture

Assigned: Unassigned » ullgren

I would argue that this is a error in the drupal framework since it creates the lable tag with the for attribute.
Isn't the same type of error also present in other drupal forms (such as admin, comment ...) ?
For example this is code from this form.

</div></div><div class="standard"><div class="form-item">
 <label for="edit-body">Description:</label><br />
 <textarea wrap="virtual" cols="60" rows="20" name="edit[body]" id="edit-body" class="textarea"></textarea>
</div>

I agree that the way I piggy back on the edit variable causes the for attribute to be even more mangeled.

I will keep this in mind and try to figure out away to solve this. I will probably need some help so please send in a any ideas or patches (that goes for all of you interested in geting this issue solved not just omar ;-).

ullgren’s picture

Status: Active » Closed (fixed)

Drupal core issue.