I think this is a typical "I want to ask $a, but do so by first asking $b, then complain and ask $a afterall", for I have given your post some thought and cannot think of any useful reason to reset a form when a user submits it.

If I get this right, you want the user to fill out a couple of form elements. After (s)he filled that out and presses the submit button, you want to clear all input and submit empty fields to your CGI script? Why offer a form? Why not call the script directly?

Personally I hate reset buttons/functions because I always hit them by accident, resulting in typing the input twice (usually I pay more attention to what button to press the second time around ;) If I mistakenly filled out a form, I'll delete it myself, or just leave the site, but all this is besides the point.

The point/question is: what do you really want with your form?

--
b10m

All code is usually tested, but rarely trusted.

In reply to Re: resetting form values by b10m
in thread resetting form values by pmachin

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.