Controlgroup widgets with other form input with name of id conflict #7223

Closed
digidoc opened this Issue Mar 9, 2014 · 2 comments

Projects

None yet

2 participants

@digidoc
digidoc commented Mar 9, 2014

This is hard to describe, so I made a jsfiddle to demonstrate:

http://jsfiddle.net/digidoc/QAX84/

The code is very basic. Notice that the controlgroup widget for the radio buttons does not work. However, if you change the first input name to something other than "id" it then works. This is only a problem with version 1.4.2. I tested it on current browsers (Firefox, Chrome, and IE).

@gabrielschulhof gabrielschulhof added this to the 1.4.3 milestone Mar 9, 2014
@gabrielschulhof gabrielschulhof self-assigned this Mar 9, 2014
@gabrielschulhof
Contributor

That's whacked! Made a jsbin for it.

@gabrielschulhof
Contributor

OK. A simple mistake. Attempting to retrieve the form's ID attribute by accessing form.id is wrong in this case. The correct solution is to retrieve it via form.getAttribute( "id" );

@gabrielschulhof gabrielschulhof added a commit that referenced this issue Mar 12, 2014
@gabrielschulhof gabrielschulhof Checkboxradio: Retrieve form ID via .getAttribute()
Closes gh-7224
Fixes gh-7223

(cherry picked from commit 9ff610d)
2f6583e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment