Form generator used by CodeGenerator