![]() |
|
good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Generalising Forms from CGI.pmby Cody Pendant (Prior) |
on Feb 19, 2003 at 01:43 UTC ( #236488=perlquestion: print w/replies, xml ) | Need Help?? |
Cody Pendant has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to make a generalised form-creation script, with a certain look and feel, that I can re-use for various things, using CGI.pm.
Here's an example:
But as you can see, it's not going to be very generalised, because I'm having to test for the type of field every time: if it's a textfield, do the textfield thing, if it's a textarea, do something else. What I can't figure out is how to do this: i.e. call the particular CGI.pm sub using the value, which is the name of that sub.
Any help greatly appreciated...
Every bit of code is either naturally related to the problem at hand, or else it's an accidental side effect of the fact that you happened to solve the problem using a digital computer.
Back to
Seekers of Perl Wisdom
|
|