Branching with Django Form Wizard -
is there way in django branch different existing formwizard option select on previous page?
like example have 2 formwizard called pizzaform
, sandwichform
. first page ask if want pizza or sandwich , option select calls form wizard depending select.
you can in view of first form. somethings this:
from django.shortcuts import render_to_response def firts_page_view(request): if request.post.get('pizza', none): form = pizzaform() template_name = 'pizza_template.html' else:#sandwich form = sandwichform() template_name = 'sandwich_template.html' return render_to_response( 'sandwich.html', {'form': form} )
Comments
Post a Comment