# Creating a grouped formset, based on existing data

**URL:** https://forum.djangoproject.com/t/creating-a-grouped-formset-based-on-existing-data/18154
**Category:** Forms & APIs
**Created:** [January 12, 2023, 2:17pm UTC](https://forum.djangoproject.com/t/creating-a-grouped-formset-based-on-existing-data/18154 "2023-01-12T14:17:46Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)
#### Post date: [January 12, 2023, 2:34pm UTC](https://forum.djangoproject.com/t/creating-a-grouped-formset-based-on-existing-data/18154/2 "2023-01-12T14:34:52Z")

</div>

> [@buswedg](#):
>
> I want to create a grouped formset, …

I’m not quite sure I’m following what you mean by this.

If you’re saying that you want multiple formsets for `TechniqueSubCategory`, where each formset is a set of `TechniqueSubCategory` that are related to an individual `TechniqueCategory`, _and_ that you want multiple `TechniqueCategory` on a page, then what you’re looking for is known as a “nested formset”.

Or, more graphically, I’m understanding you to be looking for something like this:

```plaintext
Technique Category 1
        Technique field 1
        Technique field 2
    Sub Category 1
    Sub Category 2
    Sub Category 3

Technique Category 2
        Technique field 1
        Technique field 2
    Sub Category 4
    Sub Category 5
    Sub Category 6

```

_If_ I’ve got the right impression of your situation, then I suggest you take a look at [Multiples of one formset - #12 by KenWhitesell](https://forum.djangoproject.com/t/multiples-of-one-formset/5344/12). You can also search here for other references to nested formsets, there have been a few discussions raise on this topic.

(On the other hand, if I’m completely missing what you’re trying to do here, some further details or examples of what you’re trying to achieve may help.)

---

_[View the full topic](https://forum.djangoproject.com/t/creating-a-grouped-formset-based-on-existing-data/18154)._
