Regardless of what environment you plan on using this in, the concept of how the form creation is done can be applied.
A possible issue with this is: do you want the additional overhead that this approach will create? Or are the additional queries against MySQL not an issue?