Administration Forms

Now that the database has been created it is time to consider the HTML forms that will be needed to interface with it. Before we consider the customer orders we first need to get some pizzas into the database!

The staff at Pizza Kitchen must be able to add new pizzas to the menu whenever they come up with new creations so they need a simple form to make the process of adding data to the database straightforward. There are two forms which are required:

  1. A form to add new sizes of pizza
  2. A form to add new types of pizza

In the previous section you may have noticed something strange about the entity descriptions: they both have cost attributes.

  • Pizza(PizzaID, Name, Description, Cost)
  • Size(Inches, Cost)

This is for a very simple reason, each pizza has:

  • A base cost that is dependent on its size (for example, a 12-inch pizza might cost £10)
  • An additional cost depending on the type of pizza (for example, a Hawaiian might be £2 extra and a Meat Feast £4 extra).

The designs below so how the forms should look.

Size Form

Pizza Form


Task 12

Create HTML forms that resemble as closely as possible the designs above. Use HTML5 form validation if necessary. A key question to consider is:

  • How are you going to get the existing sizes and pizzas to display on your form?