I have a simple Django form:
class CommentForm(forms.Form): comment = forms.CharField(max_length=2000, required=True) post_id = forms.CharField(max_length=2000, widget=forms.HiddenInput, required=True) parent_id = forms.CharField(max_length=2000, widget=forms.HiddenInput, required=True)
Now I want to print this form several times on my page - I do this through the template tag, so a new form is created every time. The problem is that I get the same identifier for all fields.
I know about the prefix, but I donβt want to change the names of the fields, because for all forms there is one handler, only for setting unique identifiers.
So my question is:
- Is there a way to make Django set unique identifiers if I want to display the form several times without changing the field names?
- If not, is there a way to prevent Django from displaying identifiers at all?
Silver light
source share