How to create a generic form with dynamic forms