Milestone 2 for Form Project is coming to an end.
But what's in it for me?
After a delay of two weeks I can tell you that milestone 2 has almost been finished. This means testing of the first two milestones can start pretty soon. Some minor things have to be added and fixed still, but I'll try to manage that within 2-3 days.The first two milestones cover the real basics of the forms:
- Generating forms with Typoscript
- Adding server side validation
- Using filters on the submitted data
That sounds really easy, but I have to say, it was quite a task. After starting milestone 2, I suddenly realised it would be better if extensions could use the form classes as well, so I went back to the drawing board and started to rewrite everything I did for milestone 1. I still have to test it thoroughly if it is possible if other extensions can use it as well, but they probably will. Otherwise it will only need some small fixes. The main focus was on the Typoscript how to configure every form element available.
Milestone 2 had the focus on validation and filters. It is possible to add multiple validation rules to one form element, and you can compare the input of two elements with each other, like password fields. If this comparison fails, the form will not validate.
It's also possible to filter the incoming data, for instance localized formats of digits (1000,00 or 1 000.00 or 1,000.00), title case or alphanumeric. Some more filters will be added, like the most important one, XSS, which will be active for all incoming data, opposite to the other filters, which can be added to a form element.
Before the testing period, there's still a huge task to do: writing the first documentation. How do I make a form with Typoscript? How do I add validation rules? Is it possible to use a select tag with the multiple attribute? A lot, and I really mean a lot, is configurable. But that will all get clearer when I've finished the documentation.
Before jumping up and down, I have to tell you, the project still contains a lot of tasks. Currently it is only possible to generate a form using Typoscript, validate and filter the incoming data. After that, nothing happens right now (Well, you get a message when the submitted data is valid, wow). The form won't be nice to see in the frontend, because no styling has been added. Only the (X)HTML markup is done right now. Don't think you can use this in a production environment. The reason why there was so much focus on the Typoscript is that the form wizard (milestone 4 and 5) will write the same Typoscript as it is used right now.
Keep tuned for the first documentation!