I have a website where Django forms are used, I want to make my lengthy form into multiple parts. For example part A for personal information, then on clicking next part B of form like Professional information. Is there any way I can split my form into multiple parts? also I'm using Django templates.
CodePudding user response:
Yes, and thankfully with Django is very easy to do :
from django.contrib import admin
class FlatPageAdmin(admin.ModelAdmin):
fieldsets = (
(None, {
'fields': ('url', 'title', 'content', 'sites')
}),
('Advanced options', {
'classes': ('collapse',),
'fields': ('registration_required', 'template_name'),
}),
)