A screen allows for either checkbox to use default rates or type in custom prices.
3 objectives: Array, preg_match & setting flag
1. I want user results to go to an array with fewest mods to existing setup.
Objective is have array that can be written to file & passed as variable also.
Results will show complete array of costs on [login to view URL] & also write to file
2. Previous coder used javascript for only basic field verification. Modify existing code as simply as possible to utilize existing preg_match / or use javascript equivalent. Field verification should be specific & catch bad user input.
3. After specific field verification is complete, each field (only if used) should have a flag set to on. Otherwise, flag should be off (either array, file or both)
[login to view URL]
Click on the 'Add Services' button & then should see rows with checkbox checked plus any rows with typed values. Ex. Oil Change (checked) 14.5
Oil Change (checked) 14.5
Patch (typed) 10.5 [adjusted]
Plug (checked) 6.75
Brake Pads (typed) 90 [adjusted]
Coolant (checked) 59.99
Muffler (typed) 39.99 [adjusted]
Inspection (checked) 35.00
So, on next page showing array, will list all entries unless blank. Results will be used on Order Summary page below & only display non-zero services.
[order summary] [login to view URL]
Array contents (in this example)
field title value
serv_oilchange Oil Change 14.50
serv_patch Patch 10.50
serv_plug Patch 10.50
serv_brakepads Brake Pads 90.00
serv_coolant Coolant 59.99
serv_muffler Muffler 39.99
serv_stinspection Inspection 35.00
Presentation of data on [login to view URL]
Oil Change $ 14.50
Patch 10.50
Plug 6.75
Brake Pads 90.00
Coolant 59.99
Muffler 39.99
Inspection 35.00
______
Services Total $ 256.73