I have a drop down that a user selects an order number from. I would like to use the selected item in another form. The first thing I’d like to do is assign the selected item to a variable and print it in the terminal. How do I do this?
For instance;
@login_required(login_url='/login')
def GroupOrders(request):
submitted = False
if request.method == "POST":
form = GroupOrderNumberForm(request.POST)
if form.is_valid():
instance = form.save(commit=False)
instance.user_name = request.user
# How do you get the order number?
orderNumber = GroupOrderNumberForm.order_NumberQuery(request.GET)
print(orderNumber)
...