http://qs321.pair.com?node_id=716116

genehack has asked for the wisdom of the Perl Monks concerning the following question:

I'm writing a web application that's going to need to generate a bunch of arbitrary forms and then collect, validate, and store the data that users enter into these forms.

Obviously, using a form generation library is called for, and since I'm using Catalyst, it would be nice if there was some integration between that and the formgen library. The problem I'm running into is that I need to be able to "embed" form fields inside other form fields -- for example, a series of radio buttons or checkboxes that have a text field as part of the label. (To support, for instance, a "other -- specify" sort of radio button.)

Wrinkles:

  1. this "embeded" field might not always be a textfield, it may be some other element.
  2. there may be more than one "embedded" field in a given group of options
  3. the "embedded" fields will not always be associated with the last option in the group

Near as I can tell from the documentation, FormBuilder does _NOT_ support this -- is that correct? I've also looked at FormFu, which also doesn't seem like it will do this out of the box -- maybe with a lot of custom Multi element rolling, but I didn't find that section of the FormFu documents particularly easy to follow.

Any suggestions or pointers -- whether that's pointing out I'm wrong in the above assessments, pointing out another option, or pointing, laughing, and saying "start writing your own, monkey boy!" -- gratefully received.