You are right, that is want I want. Things are somewhat different though, because since I'm using catalyst I also have the .tt-Files (HTML) and the .fb (form definition) to consider.

To make matters worse I'm working in an environment where the package ext (JS-Package) loads the html via ajax. JS inside of the html therefore will not be executed (in a consistent way, considering all browsers).

Because I (want to) use the same perl construct in several html-templates the predefined js-functions have to be able to identify the correct formbuilder-element. Eventually I ended up with this solution:

CGI::FormBuilder::Source::File lets me define an additional id, if I do so, formbuilder will use this and not create its own. That is true for the form element as well as for the input-elements.

Even better, in the html-template I can ask the formbuilder input object for its id. The only minor flaw is, that the id of the form object can not be found this way

So I have to enter that id in several files, which kind of bugs me and causes bugs ;-)

Guess, I'll have to live with it

Thanks anyway


In reply to Re^4: Formbuilder: generate id, that includes formname by Wolfgang
in thread Formbuilder: generate id, that includes formname by Wolfgang

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.