Closed (fixed)
Project:
Webform
Version:
5.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Jul 2007 at 20:38 UTC
Updated:
22 Jan 2008 at 05:16 UTC
Haven't verified this in HEAD, but for reasons that were quite sensible to the creator, one of my users made a webform with two identically named fieldsets.
The page was created with two identical IDs on those fieldsets which is invalid DOM as well as making the ID-based javascript I was doing on those two fieldsets a little tricky.
Perhaps an ID map should be maintained for easy incrementing as needed.
(I hope you don't change the actual syntax, would make a few form specific styles and javascript I have out [and doubtless those of others as well] in need of updating)
Comments
Comment #1
kyber commentedCorrected version.
Comment #2
gpk commentedSame sort of problem can occur having any 2 fields with same ID. I (accidentally) set up 2 select controls with the same field id, and as a result one of them did not display.
Suggest all field IDs should be unique within a given form.
Comment #3
kyber commentedNot unreasonable to be sure, still a bug though. In this particular case was a multi-part form where different portions of the form with similar-but-different fieldsets would be shown/hidden depending on who the user was.
I can see issue with fieldset names definitely cropping up in a sufficiently complex form. The field name thing, definitely less likely.
Comment #4
quicksketchAll elements are now validated to ensure unique form id's to prevent this problem.