Closed Bug 653714 Opened 13 years ago Closed 11 months ago

In the forms send the first value instead of the last with the same name attribute

Categories

(Core :: DOM: Forms, defect)

x86_64
Linux
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: manzhikov, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.57 Safari/534.24
Build Identifier: Mozilla/5.0 (X11; Linux x86_64; rv:2.0) Gecko/20100101 Fi

If we have 2 values with same attributes
for example:
<input type="hidden" name="test" value="0" />
<input type="checkbox" name="test" value="1" checked="checked" />

after send form, we have "test" value = 0

Reproducible: Always



Expected Results:  
after send form, we must have "test" value = 1
Can you hook up a reduced working Testcase https://bugzilla.mozilla.org/attachment.cgi?bugid=653714&action=enter ?
Version: unspecified → 4.0 Branch
QA Whiteboard: qa-not-actionable

In the process of migrating remaining bugs to the new severity system, the severity for this bug cannot be automatically determined. Please retriage this bug using the new severity system.

Severity: major → --
Component: General → Layout: Form Controls
Product: Firefox → Core
Version: 4.0 Branch → unspecified

Moving to the DOM:Forms component since I think that's where submission of values gets managed. (Layout:Form Controls is more about the rendering of the form fields)

Having said that, I also can't reproduce; it seems we submit both values for test, and Chrome does as well.

I'll attach at testcase based on comment 0, to demonstrate.

Closing as WORKSFORME, anyway.

Status: UNCONFIRMED → RESOLVED
Closed: 11 months ago
Component: Layout: Form Controls → DOM: Forms
Resolution: --- → WORKSFORME

If I view the testcase and click "submit", I end up at

https://bug653714.bmoattachments.org/attachment.cgi?test=0&test=1

Note the ?test=0&test=1 suffix -- we're sending both values, and it's up to the site to handle the fact that they've asked for two values with the same name.

This happens in Chrome and my linux WebKit browser (epiphany) as well.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: