Hi again I am trying to create a web application that requires use of forms often. I want to use design patterns that I can use easily without hard-coding every time. I think I need to use Factory Pattern. I am new to PHP, so if someone can give me an advise, which design pattern would be more appropriate. Thanks
You are absolute correct and Factory is one of the most appropriate one but remember that if you need more type of objects to be created like forms / other things then you can go for abstract factory
Something like PHP: CreateObject(string objType) { switch(objType) { case "text": return '<input type="text" name="somename" />'; } }