PHP Form Development Best Practices

I'm looking for advice on Best Practices in form design for PHP. Do most people hand code each form that they build to interact with their database?

I have written my own object code to handle the display of the form, the CRUD and the validation. I am currently considering extending the functionality so that the parameters for each form and each control are stored in a database - and I'm wondering if that's normal, or if there is a better way to do it. Would it be advisable to use a framework?

My motivation is that I want administrators of my webapp to be able to choose an "Edit this list" option from any <select> which will pop up a modal form of the table for that <select> so that they can make additions/deletions and changes and I feel that the best way to manage that is by having the form created at runtime by pulling the parameters for the form from the database.

Thoughts?

P.S. I expect that I will split points if I receive good advice from multiple experts :-)
LVL 15
dirknibleckAsked:
Who is Participating?
 
Richard DavisSenior Web DeveloperCommented:
Seeing as PHPCake already performs dynamic form generation, customized validation and has a very solid CRUD design, perhaps this would be the best place for you to consider working out of.

There's nothing wrong with reinventing the wheel if doing so will yield a better performing wheel or you have found a way to make a square wheel not as rough of a ride, but overall, the PHPCake framework was developed by people that write this sort of code in their sleep and has a proven track record.

Hope this helped a little. :)

~A~
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.