Added some features to the form builder to handle errors better.