Re: Making CGI.pm forget

Discussion in 'Perl Misc' started by J. Strübig, Jun 20, 2012.

  1. J. Strübig

    J. Strübig Guest

    Am 19.06.2012 17:51, schrieb Bernie Cosell:
    > One aspect of CGI.pm that I've never liked is that it tries to 'remember'
    > form variables from one page to the next --- and worse makes it hard to
    > change a value,


    that's not true. it's very easy to change this and the docs say it clearly:

    Another note The default values that you specify for the forms are only
    used the first time the script is invoked (when there is no query
    string). On subsequent invocations of the script (when there is a query
    string), the former values are used even if they are blank.

    If you want to change the value of a field from its previous value, you
    have two choices:

    (1) call the param() method to set it.

    (2) use the -override (alias -force) parameter (a new feature in version
    2.15). This forces the default value to be used, regardless of the
    previous value:

    http://search.cpan.org/~markstos/CGI.pm-3.59/lib/CGI.pm#CREATING_FILL-OUT_FORMS:
    J. Strübig, Jun 20, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Emil Kvarnhammar

    Re: Make text boxes "forget" values

    Emil Kvarnhammar, Jul 16, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    432
    Emil Kvarnhammar
    Jul 16, 2003
  2. Ames Andreas (MPA/DF)
    Replies:
    0
    Views:
    265
    Ames Andreas (MPA/DF)
    Aug 5, 2004
  3. Wolf Behrenhoff

    Re: Making CGI.pm forget

    Wolf Behrenhoff, Jun 19, 2012, in forum: Perl Misc
    Replies:
    0
    Views:
    490
    Wolf Behrenhoff
    Jun 19, 2012
  4. Xho Jingleheimerschmidt

    Re: Making CGI.pm forget

    Xho Jingleheimerschmidt, Jun 20, 2012, in forum: Perl Misc
    Replies:
    0
    Views:
    516
    Xho Jingleheimerschmidt
    Jun 20, 2012
  5. ccc31807

    Re: Making CGI.pm forget

    ccc31807, Jul 11, 2012, in forum: Perl Misc
    Replies:
    0
    Views:
    437
    ccc31807
    Jul 11, 2012
Loading...

Share This Page