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:
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:
select DirectoryLink3.description from DirectoryLink_profiles
join DirectoryLink3 on DirectoryLink_profiles.directorylink = DirectoryLink3.id
where id = …