So once more I've hit the "Form won't submit" stumbling block, and each time I fiddle on and fiddle on, eventually I get it to work, but it seems very un-reliable.
This time, keeping track of what I'm doing, it seems to be the "Data" attribute that's the problem.
Form template declaration looks like this:
Handlers are set up like this:
And the submit button inside the form tag like this:
No matter how many times I hit the submit button neither the good or the bad submit handlers get hit, I've also tried various combinations of @ symbols on variable names, attribute names and nothing seems to work.
I have another form set up the exact same way, accept all of it's data is in one object, and that object is set as the "Data" parameter, I have no problems with that.
In the case of this dialog however, I cannot give it a single object, as the input data is made up from a number of different data sources, read from individual drop downs and such like on the form, and then combined into a single object in the submission handler before being sent to the database.
I want to use the TemplateForm, so that I can attach validators to some of the form fields, which I don't believe I can use without a templateform, but how am I supposed to use the template form if I must give it a single data object in it's data attribute, it makes no sense?