- User put some information in the price inquiry form and hit the calculate button
- User is moved to the page displaying the price with the information user put in the form
- If user is happy with the price and wanna go ahead booking, then there is a booking button
- Once user hit the booking button, user would be accessed to the booking_form automatically
- On the booking form, User can see the information he put before, so he does not have to put them in again and he can complete the rest columns in the booking form.
-- this is what I wanted
So far, I did successfully upto no 4. I would like to transfer the information user put and the price calculated into the booking_form. but input tag does not allow {{ object }} inside tag.
To make you understood better, I have attached the 'price_detail.html' below.
{% extends 'basecamp/base.html' %}
{% block content %}
<form action="{% url 'booking_form' %}" method="post">
{% csrf_token %}
<div class="container">
<div class="py-md-6">
<h1> The price : $ {{ price }} </h1>
<p class="fs-lg text-light" >{{ flight_date }} | {{ flight_number }} | {{ suburb }} | {{ no_of_passenger }} </p>
<br/>
<button class="btn btn-warning" type="submit">Book now</button>
</div>
</div>
{% endblock %}
I think I need to put the objects that I got from the price inquiry form into the input tag in order to transfer them into the booking_form but input tag/select tag does not allow that {{ }} inside tags.
Is there any alternative ways to transfer those objects into the booking form when User hit the booking button?