Hi There,
I am writing a module for SilverStripe that makes a SilverStripe site a Single Page App (SPA). We have this requirement for a web application we are writing, because it is very client side heavy and has a geo app that requires saving state on the client between page changes.
So far so good, it is using AngularJS and TypeScript and routing, the app etc works fine. However, I'm having a problem with Forms. They render fine into the template and get loaded via AJAX and everything, including submission, security check and validation over AJAX etc works.
However, I cannot get the form to display with error messages when the validation fails.
In my naivety I just triied
$form->forTemplate()
but that gives me the Form without errors displayed, even though I ran
$form->validate()
I can post some more code if required, but I hope you can understand the problem from this.
Any help much appreciated!
Tim