Question: iii. Add booking reference field to the data entry form Modify tma02_dataform.php to provide a labelled text field to accept a string of 10 characters
- iii.Add booking reference field to the data entry form
Modify tma02_dataform.php to provide a labelled text field to accept a string of 10 characters in the data entry form.
(5 marks)
Mike wants to also capture the booking reference in the form.
Add a label with the text Booking Reference and a corresponding text input field and feedback element to the data entry form. Note that the input field should have a size limit of 10 characters and must be completed with 10 characters by the user. Mike does not want to capture information other than from customers, so every entry will have a booking reference. When the limit is reached it should stop accepting characters, but no message should be produced. Your new form field should have a suitable and meaningful name attribute and use the same name as its id.
The field value should be empty when the page loads.
If you examine the supplied code carefully and observe how the current labels, fields and feedback are implemented, these will give you a good framework from which you can create the additional label, field and feedback element.
// For security, required PHP files should "die" if SAFE_TO_RUN is not defined if (!defined('SAFE_TO_RUN')) { // Prevent this file run directly - show a warning instead die(basename(__FILE__) . ' cannot be executed directly!'); } ?>
Thanks
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
