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 8893201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:11:13+00:00 2026-06-14T23:11:13+00:00

I’m trying to adopt crispy-forms and bootstrap and use as much of their functionality

  • 0

I’m trying to adopt crispy-forms and bootstrap and use as much of their functionality as possible instead of inventing something over and over again.

Is there a way to have inline forms functionality with crispy-forms/bootstrap like django-admin forms have?

Here is an example:

class NewProjectForm(forms.Form):
    name = forms.CharField(required=True, label=_(u'Название проекта'), widget=forms.TextInput(attrs={'class':'input-block-level'}))
    group = forms.ModelChoiceField(required=False, queryset=Group.objects.all(), label=_(u'Группа проектов'), widget=forms.Select(attrs={'class':'input-block-level'}))
    description = forms.CharField(required=False, label=_(u'Описание проекта'), widget=forms.Textarea(attrs={'class':'input-block-level'}))

    class Meta:
        model = Project
        fields = ('name','description','group')

    def __init__(self, *args, **kwargs):
        self.helper = FormHelper()
        self.helper.form_class = 'horizontal-form'
        self.helper.form_action = 'submit_new_project'
        self.helper.layout = Layout(
            Field('name', css_class='input-block-level'),
            Field('group', css_class='input-block-level'),
            Field('description',css_class='input-block-level'),
        )
        self.helper.add_input(Submit('submit',_(u'Создать проект')))
        self.helper.add_input(Submit('cancel',_(u'Я передумал')))
        super(NewProjectForm, self).__init__(*args, **kwargs)

it will display a decent form:

example of single form rendered with crispy-forms

How do I go about adding a form that basically represents this model:

class Link(models.Model):
    name = models.CharField(max_length=255, blank=False, null=False, verbose_name=_(u'Название'))
    url = models.URLField(blank=False, null=False, verbose_name=_(u'Ссылка'))
    project = models.ForeignKey('Project')

So there will be a project and name/url links and way to add many, like same thing is done in django-admin where you are able to add extra ‘rows’ with data related to your main model. On the sreenshot below you are able to fill out data for ‘Question’ object and below that you are able to add data for QuestionOption objects -you are able to click the ‘+’ icon to add as many QuestionOptions as you want.

I’m not looking for a way to get the forms auto-generated from models (that’s nice but not the most important) – is there a way to construct a form that will let you add ‘rows’ of data like django-admin does?

screenshot of django-admin

  • 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-14T23:11:15+00:00Added an answer on June 14, 2026 at 11:11 pm

    The inline forms you refer to, are known in Django as Formsets. If you want to know more about formsets, you can find them in the Django forms documentation.

    Crispy supports rendering inline formsets, as described in the section ‘Rendering Formsets’

    Please note that formsets by default show 3 extra inline forms, allowing you to add three more objects. After saving, you again get three extra inline formsets to add even more.

    If you want an ‘add more’ button like in the Django Admin, you will need to use some Javascript to dynamically add those rows.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to render a haml file in a javascript response like so:
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

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.