Question
iii. Add booking reference field to the data entry form Modify tma02_data_form.php to provide a labelled text field to accept a string of 9 characters
iii.Add booking reference field to the data entry form
Modify tma02_data_form.php to provide a labelled text field to accept a string of 9 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 9 characters and must be completed with 9 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.
In your solution document, provide your code and a screenshot of the web page showing the updated data entry form. Note that at this point the displayed field will not generate the validation messages that the other fields do.
// For security, required PHP files should "die" if SAFE_TO_RUN is not defined if (!defined('SAFE_TO_RUN')) { // Prevent direct execution - show a warning instead die(basename(__FILE__) . ' cannot be executed directly!'); } ?>
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started