a class to generate a form