several forms in 1 html file and closing a modal when data is valid

i am new to django and html along with css. created my html and css and now working on developing with django. I have 3 forms in 1 html file. login, register and forgot password. Have been breaking my head and couldn’t find a proper solution. what i did so far is create the register form (which is a modal done with css) but don’t know how to define a new form in the same html.
views file:

def index(request):
form = RegisterForm()

if request.method == 'POST':
    form = RegisterForm(request.POST)
    if form.is_valid():
        form.save()
        user = form.cleaned_data.get('username')
        messages.success(request, 'Membership was created for ' + user)
        return redirect('http://127.0.0.1:8000')

context = {'form':form}
return render(request, "index.html", context)

how to add another form which is under index.html?
also i tried the above method for the redirect to close the modal but it is not closing
appreciate someone’s help to explain to a newbie on the solution or provide some link with a solution. on how to add another form to the index.hml and hoe to close the modal once the form is valid and submitted

Go to Source
Author: rabih