I am assuming that before hitting the submit button I can not use Perl to validate entries as they are entered on an HTML Form. I am assuming that Javascript is the only option I have available.

I already plan to validate the data after the submit via Perl and then enter the data into the database but I am trying to build a web form that is somewhat dynamic and validates on the fly.

Another problem I am having is that I have a section of the form which is more of a table. Sometimes the table is 1 record wide and others it is up to 10 records wide. There are about 8 different fields I am looking at.

My current option is to build a multipart form. The first form would collect all the data I need not including the table. One of the entries in this form is to ask how many records are to be entered. After validating this sheet and posting the data to the database I then would go to another form setup with this table setup according to the number entered initial page.

I would like to be able to have an interactive page which would "throw" this table up with the correct number of records setup after entry of a new number in the assocated field.

If I understand the CGI, Perl and web stuff however perl can only setup the format of the page and the initial default data. Once sent to the browser there is no more interaction with the browser until the user hits the "submit" button. Thus in order to make an interactive web page I would have to use javascript.


In reply to Can perl do interactive forms? by rfulk

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.