Opened 9 years ago

Closed 9 years ago

#1963 closed defect (invalid)

Multiple form variables of the same name get lost.

Reported by: anonymous Owned by: adrian
Component: Core (Other) Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


Multiple form variable of the same name get lost.

<form action="./result" method="post">

<input name="moo" value="one" />
<input name="moo" value="two" />


request.POST[moo] is two

This would be fine if the other values were accessible at middleware level, unfortunately they are not, so it is impossible to prioritise them or process them into, for example, a list for the view to deal with.

Change History (1)

comment:1 Changed 9 years ago by adrian

  • Resolution set to invalid
  • Status changed from new to closed

This is how HTML forms work. If you have multiple <input name="moo"> elements, only the last one gets saved. The solution is to use different names for your <input> tags.

Note: See TracTickets for help on using tickets.
Back to Top