added a few methods to Form.php