[Answered ]-Multiple Comment Forms on One Page in One Template – Django

0👍

While using the Django form prefix was partially correct (thanks @ Daniel Roseman), the assertion that it doesn’t matter how many form elements I have is not quite correct. It does matter, because by default the prefix was meant to be used in one form (as it creates multiple replicate ids). To use it in multiple forms, you also need auto_id=False. This prevents the id from being generated by the Django form.

2👍

You can use the prefix parameter when instantiating your forms to give them non-conflicting ids.

Leave a comment