7

When two forms on one page have the same-named field, Django will generate invalid HTML:

<!--one form -->
<input id="id_name"..../>
...
<!--another form-->
<input id="id_name".../>

Invalid because two or more nodes share the same id.

How can this be avoided?

Thanks.

Evgeny
  • 10,698
  • 9
  • 60
  • 70

1 Answers1

14

You need to use form prefixes, as documented here.

shanyu
  • 9,536
  • 7
  • 60
  • 68