I have 2 html pages A and B. The user fills the AForm in the 'A' HTML page(URL: A) then he will go to the 'B' html page (url: A/B) but i would like to keep the AForm data of the 'A'HTML page in the python code in order to use it after in the python function pointing to the 'B' HTML page.
My idea was to retrieve the form data in parameter of the function pointing to the 'B' HTML page.
First:
I have tried to point the form data to the 'B' HTML page via this line in the 'A' HTML page code:
<form action="A/B" method="POST">
This is the function pointing to the A HTML page:
def A_HTML_Function_view(request):
AForm = A_Form()
if request.method == 'POST':
AForm_result = A_Form(request.POST)
BForm
return render(request, 'AppName/B.html',{'Bform':Bform})
else:
AForm = A_Form()
return render(request, 'AppName/A.html',{'AForm':AForm})