Hi everyone,
Wondering if anybody is able to offer assistance regarding the following.
I made a system we use at work for making rotas and staff can log in at home, view the rotas etc and put in holiday requests.
At present the requesting process isn't as tight as i'd like it to be. People input a date such as 12/12/2012 - 13/12/2012. But the whole process in place can be a bit confusing.
Is there a way that people can input a date range such as above and THEN have php generate a form, whereby it will ouput a few form elements for each date in the range entered for them to complete?
I'll need a tickbox for "holiday" or "shift request" which will then enable a dropbox with options "AM, PM, MID, OFF" to pick from. And either the holiday or shift request tickbox will be a requirement for each date and then if shift request is selected, the shift options dropbox will be required.
This will then add the request to the database which will be setup as follows:
Table = Requests_List
Fields = ID, StaffID, Request_Name, Request_Reason, DateFrom, DateTo, Status
Table = Requests_Element
Fields = ID, Request_ID, StaffID, Date, Leave_Type, Shift, Status
The request itself will be added to Requests_List
Then each date in the range will be added as a Request_Element under the request id and will be input with a status of 0 meaning 'new request'.
This will then allow requests to be authorised by managers in part and parts declined that can't be authorised.
Is there a way to do this? I'm not new to PHP, i happen to be really good at picking various code and chopping it all up into one and then modifying bits and bobs, I'm just absolutely useless at writing my own stuff like this from fresh.
Be really grateful, even if you don't know the whole solution, to offer a bit of help with how i get forms made dynamically like this, and I can go from there.
Thanks everyone 🙂