title: Flexible forms and supporting database structure
body: <p>I have been tasked with creating an application that allows administrators to alter the content of the user input form (i.e. add arbitrary fields) - the contents of which get stored in a database. Think Modx/Wordpress/Expression Engine template variables. </p>
  
  <p>The approach I've been looking at is implementing concrete tables where the specification is consistent (i.e. user profiles, user content etc) and some generic field data tables (i.e. text, boolean) to store non-specific values. Forms (and model fields) would be generated by first querying the tables and retrieving the relevant columns - although I've yet to think about how I would setup validation.</p>
  
  <p>I've taken a look at this problem, and it seems to be indicating an EAV type approach - which, from my brief research - looks like it could be a greater burden than the blessings it's flexibility would bring. </p>
  
  <p>I've read a couple of posts here, however, which suggest this is a dangerous route:</p>
  
  <p><a href="https://stackoverflow.com/questions/3011224/how-to-design-a-generic-database-whose-layout-may-change-over-time">How to design a generic database whose layout may change over time?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/66385/dynamic-database-schema/">Dynamic Database Schema</a></p>
  
  <p>I'd appreciate some advice on this matter if anyone has some to give</p>
  
  <p>regards</p>
  
  <p>SWK</p>