# Help with many to many formsets

**URL:** <https://forum.djangoproject.com/t/help-with-many-to-many-formsets/7328>\
**Category:** Forms & APIs\
**Created:** [April 1, 2021, 5:43pm UTC](https://forum.djangoproject.com/t/help-with-many-to-many-formsets/7328 "2021-04-01T17:43:21Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![typonaut](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/typonaut/32/2316_2.png) [@typonaut](https://forum.djangoproject.com/u/typonaut)\
**Post date:** [April 2, 2021, 7:59pm UTC](https://forum.djangoproject.com/t/help-with-many-to-many-formsets/7328/9 "2021-04-02T19:59:34Z")

</div>

No, you’re right. I got the `form` input in the `inlineformset_factory` working, then when the `directorylink` field is set to the `TextInput` widget the entire query to get the data for the formset changes.

My form looks like this:

```auto
class DirectoryChoices(forms.ModelForm):
	
	class Meta:
		model = DirectoryLink_profiles
		
		fields = (
			'uselesstext',
			'profile',
			'directorylink',
			)
			
		
		widgets = {
            'directorylink': forms.TextInput(attrs={'placeholder': 'Do not edit!'}),
        }

```

Following which, my only problem is getting the `description` field on the form, where the `directorylink` field is the foreign key to the `DirectoryLink3` model.

In SQL terms:

```auto
select DirectoryLink3.description from DirectoryLink_profiles
join DirectoryLink3 on DirectoryLink_profiles.directorylink = DirectoryLink3.id
where id = …

```

---

_[View the full topic](https://forum.djangoproject.com/t/help-with-many-to-many-formsets/7328)._
