public void personDetailsForm() {
		super.personDetailsForm();

		// If fields not empty
		if (name != null && address != null && email != null && contactNumber != null) {

			// Edit mode selected
			if (editMode) {
				driver.getPersonDB().changePersonDetails(person, name, email, contactNumber,
						address, 0, null, null, null);
				setTextField(getIndex(driver.getPersonDB().getCustomerList()), driver.getPersonDB()
						.getCustomerList());
				valid = true;
			}
			// Adding a new customer
			else {
				valid = true;
				driver.getPersonDB().createNewPerson(person, name, email, contactNumber, address,
						0, null, null, null);
				setTextField(driver.getPersonDB().getCustomerList().size() - 1, driver
						.getPersonDB().getCustomerList());
			}
			// Set enabled status of buttons
			deletePersonButton.setEnabled(true);
			newPersonButton.setEnabled(true);
			editPersonButton.setEnabled(true);

			// Set visibility of buttons
			editPersonButton.setVisible(true);
			submitButton.setVisible(false);
			cancelButton.setVisible(false);
			cancelEditButton.setVisible(false);
			newPersonButton.setVisible(true);
		}
		else {
			JOptionPane.showMessageDialog(null, "" + errorMessage);
		}
		// Reset the view
		revalidate();
		repaint();
	}