i have the following problem with CGI::Formbuilder:
i want to create a form which should be the interface to a database,
meaning it should insert the data. this form should have partly dynamic fields, meaning for example

i have a field called "friends" every user adding content, has a different amount of friends.
how to do this within one form?
i have to do it in one form, as the entries should be _not_ inserted
into the db when the user does not finish the form...
i thought about creating a button which says "add friend" - when this
button (or image) is clicked, it sends the whole form data again to the
same form, plus some additional variable (let's call it friends_amount),
counting up (which indicates how much friends-insert fields it should have).

from the point of formbuilder, the friends-fields should be rendered in
a loop, depending on the friends_amount variable. the naming of the form
fields must be "variable variables" - as i don't know about any better
solution until now...

my questions:
* is this possible?
* any hints, comments?
* any better ways to do this? (i.e. with multi-page-forms?)

thanx :)
ile

In reply to dynamical forms with CGI::FormBuilder? by ile

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.