Hello everyone, I need some help. I have a form that I want to send to a specific div on the same page. This is what I am aiming for. I have a floating div named "basket" in the top right corner of my page where I want the form data to be displayed after submission.
I'm having trouble finding information on how to do this and would appreciate it if someone could guide me through the process. Just to clarify, I haven't written any AJAX code yet, so please keep it as simple as possible. Thank you in advance :)
<form id="payment">
<!-- select pizza section -->
<fieldset>
<legend> Select your pizza </legend>
<p><input type="checkbox" name="pizza_size" value="select_pizza_size"> Small<span class="price"> £5.50</span></p>
<p><input type="checkbox" name="pizza_size" value="select_pizza_size"> Medium<span class="price"> £8.50</span></p>
<p><input type="checkbox" name="pizza_size" value="select_pizza_size"> Large <span class="price"> £11.50</span></p>
</fieldset>
<!-- toppings section -->
<fieldset>
<legend> Select one or more toppings </legend>
<p><input type="checkbox" name="topping" value="select_pizza_topping"> Bacon <span class="price"> £0.20</span></p>
<p><input type="checkbox" name="topping" value="select_pizza_topping"> Chicken <span class="price"> £0.20</span></p>
<p><input type="checkbox" name="topping" value="select_pizza_topping"> Beef <span class="price"> £0.20</span></p>
<p><input type="checkbox" name="topping" value="select_pizza_topping"> Sweetcorn <span class="price"> £0.20</span></p>
<p><input type="checkbox" name="topping" value="select_pizza_topping"> Onion <span class="price"> £0.20</span></p>
<p><input type="checkbox" name="topping" value="select_pizza_topping"> Peppers <span class="price"> £0.20</span></p>
<p><input type="checkbox" name="topping" value="select_pizza_topping"> Sausage <span class="price"> £0.20</span></p>
</fieldset>
<!-- extras section -->
<fieldset>
<legend>Extras</legend>
<p><input type="checkbox" name="extras" value="extra_sides"> Extra Cheese <span class="price"> £0.50</span></p>
<p><input type="checkbox" name="extras" value="extra_sides"> Chips <span class="price"> £1.50</span></p>
<p><input type="checkbox" name="extras" value="extra_sides"> Cola <span class="price"> £0.50</span></p>
<p><input type="checkbox" name="extras" value="extra_sides"> Fanta <span class="price"> £0.50</span></p>
</fieldset>
<!-- Delivery info section -->
<fieldset>
<legend> Delivery Information </legend>
<p><label> Address Line 1(*): </label> <input type="text" name="address" required></p>
<p><label> Address Line 2: </label> <input type="text" name="address"></p>
<p><label> Post Code(*): </label> <input type="text" name="post_code" required></p>
</fieldset>
<!-- Submit button -->
<div id="submit">
<input type="submit" class="submit_button" value="Place Order">
<input type="reset" class="reset_button" value="Reset">
</div>
</form>