I have been asked by a client to create a form that would automatically create an employee manual geared to a specific job site.
If the supervisor checked on the box that states the square footage is over 5,000 feet, the form would show cleaning instructions for that size of venue. If they checked unfinished construction, it would include rules regarding site cleanup. If there was no power on the site, it would include instructions on using a generator - and so on.
As you get further into the form, besides the simple A/B/C choices, it would also use information previously entered, to affect the new modules. For example, if will the walls of the site are to be primed, the instructions for the painting would take into account that the site has 5000 sq.ft. and that it is new unfinished construction.
Not too complicated, until we go through about 50 questions, and the instructions to be offered for each may need to be influenced by any or many of the questions before it.
I have been trying to work out a logic, and a database schema, that will handle this kind of recursive input.
I am certainly not asking anyone to provide the code to do this, I am just looking for some guidance on the best practices for this situation.
Is there some open source program, for any purpose, that uses a similar logic, so I could review their code?
Any help or guidance would be appreciated. I am working with PHP and mysql.