I'm working with a django(4) project, Where I have two forms and want to combine them into one to display in my template with custom html not by sing {{form}} syntax.
Here's my forms.py:
class UserUpdateForm(forms.ModelForm):
email = forms.EmailField()
class Meta:
model = User
fields = ['username', 'first_name', 'last_name', 'email']
# Create a ProfileUpdateForm to update image.
class ProfileUpdateForm(forms.ModelForm):
class Meta:
model = Profile
fields = ['image']
How can I combine both of these forms into single one to display all the filed in HTML and submit as a single form?
you can use html form tag without sumbit button. and save new data with javascript function by ajax.