I’m currently playing around with HTML_QuickForm for generating forms in PHP. It seems kind of limited in that it’s hard to insert my own javascript or customizing the display and grouping of certain elements.
Are there any alternatives to QuickForm that might provide more flexibility?
If you find it hard to insert Javascript into the form elements, consider using a JavaScript framework such as Prototype or jQuery. There, you can centralize the task of injecting event handling into form controls.
By that, I mean that you won’t need to insert event handlers into the HTML form code. Instead, you register those events from somewhere else. For example, in Prototype you would be able to write something like this:
Also have a look at the answers to another question.
/EDIT: of course, you can also insert custom attributes and thus event handlers into the form elements using HTML_QuickForm. However, the above way is superior.