I've read a lot of posts in the form section, and the same sorts of questions keep coming up. I think a complete form tutorial that does more than just "this field requires some text" would really solve a lot of problems and eliminate a lot of forum questions!
Please note: I would happily write one if I knew how to get the form working as I want!
I think most users would appreciate a tutorial that does the following:
Sets up a form
Styles it (an asterisk beside required fields), perhaps lay it out in columns rather than the name with the field underneath it.
Allows you to change the "Sorry this field is required" type message for each field (if that's possible)
Optional parts that if a field is set to a certain value, it brings up another section.
A radio button list that has "Other" at the bottom, and if the radio button is set to that, a text field with "Other" appears (or is enabled, or whatever) allowing you to type in the text.
Checkbox behaviour similar to the above radio buttons
I think it REALLY needs to have client and server validation options too:
If a particular value is set in a field, a message appears.
If the user submits the form and parts are invalid, the server can return the form again with "this bit is invalid" on a certain field.
Has anyone managed to do anything like the above? I would love to see any code dealing with forms in this manner. In ASP/PHP on my own forms, I can do all sorts of stuff and I was hoping it would be just as easy in Silverstripe, but I get stuck and limited to validation along the lines of "this field must have a value in" and that's about it!
Some developer or SS legend - please help us!
PS: I have tried the UserDefinedForm which seems to have some great promise, but it doesn't work properly in Silverstripe (2.3.1 and I tried with 2.3.3 aswell) - loads of errors appear and I got fed up with it!