updated FormGenerator.php