Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8704221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:03:01+00:00 2026-06-13T03:03:01+00:00

I want to use forms.ModelForm, however, I’m using the same form multiple times in

  • 0

I want to use forms.ModelForm, however, I’m using the same form multiple times in the template.

e.g.

...
{{ form.as_p }}
{{ form.as_p }}
{{...
...

Therefore, the names and ids of the forms are all the same. So how can I still use ModelForm but change the ids and names of the inputs?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T03:03:02+00:00Added an answer on June 13, 2026 at 3:03 am

    You could add an name/id to each form using a handful of different techniques, though you probably want to use a formset.

    https://docs.djangoproject.com/en/dev/topics/forms/formsets/

    These can be confusing initially if you’ve been looking at forms, but so long as you understand that it’s another layer of abstraction and you need to take care of which ModelForm instance you are working with.

    Specifically you may want to use django.forms.models.modelform_factory.

    https://docs.djangoproject.com/en/dev/topics/forms/modelforms/#model-formsets

    Usage is really easy, but if you want to do anything interesting with the forms it can be more difficult:

    >>> from django.forms.models import modelformset_factory
    >>> AuthorFormSet = modelformset_factory(Author)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have WinForms app and multiple forms and want to use ErrorProvider component on
I have a form element I want to use in many forms, a standard
How to use forms authentication without login control.I don't want to use asp.net login
I am going to use forms authentication but I want to be able to
Scenario I have a windows forms application. I want to use two different WCF
I am working on a Windows Forms application in C#/.Net. I want to use
I use Zend framework to build the forms, I want to make the edit
I want to use a user inputed name in the form of an NSString
i want to use facebook's fb:dialog tag to display a simple pop-up form for
I have a problem with dojox.form.Uploader. I want to use it to attach files

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.