Chapter 5. Add Controls to Create, Edit, and Delete Events
Now that the calendar can be viewed, you need to add controls that will allow administrators to create, edit, and delete events.
Generating a Form to Create or Edit Events
To edit an event or add new events to the calendar, you need to use a form. You do this by adding a method called
displayForm() that generates a form for editing and creating events to the
This simple method accomplishes the following tasks:
Checks for an integer passed as the event ID.
Instantiates empty variables for the different fields used to describe events.
Loads event data if an event ID was passed.
Stores event data in the variables instantiated earlier if it exists.
Outputs a form.
By explicitly ...