Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I've got a CGI (written in perl, of course) that several different forms pass their data to.

I can get a list of form parameters and their values, but in addition to this I would like to also know the parameters of the parameters.

So if I have a form with

<INPUT TYPE="textfield" NAME="State" VALUE="gaseous">

my parameters hash will have a key State with a value 'gaseous'. I would also like to find out what the type is, or if it is readonly, etc.

Is this information even passed by the form?

Thanks.

Replies are listed 'Best First'.
Re: cgi.pm - get parameters of form tags
by gellyfish (Monsignor) on Jul 22, 2004 at 15:12 UTC

    Er, no you can't get it's type unless you contrive some mechanism to pass this metadata from the form yourself - of course the answer would be the same whatever programming language you were to use.

    /J\

Re: cgi.pm - get parameters of form tags
by borisz (Canon) on Jul 22, 2004 at 15:13 UTC
    Is this information even passed by the form?
    No, the information is not submitted. But ou can add a hidden field to supply the information.
    Boris

      Just beware of trusting the security of things stored in hidden fields.

      Steve
      ---
      steve.org.uk