Symfony 1.2 sfForm formatter to add stars on required fields
The following is a form formatter class I developed to automatically add stars * on required fields. Feel free to use it and let me know if it can be improved.
You might ask, why not just use setLabels?
Firstly, if you already set required fields to true/false in setValidators, why do you have to add the stars manually again in setLabels? It just doesn't make sense!
Secondly, using setLabels to add stars is interfering with language translation.
Thirdly, this is I believe a proper (or proper-ish?) way to do this kind of things with sfForm.
Symfony redirect vs forward
I have not read a lot of articles on this but I did a quick Google search and found that all of the few articles I read seems to suggest redirect over forward. But I have a different opinion here, I would suggest that forward is better than redirect in most (if not all) cases.