Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

A noobish question about forms

by dr_jkl (Acolyte)
on Jan 30, 2012 at 10:34 UTC ( #950742=perlquestion: print w/replies, xml ) Need Help??
dr_jkl has asked for the wisdom of the Perl Monks concerning the following question:

O Monks, A newbie question:

I have an html5 web form which I want to be able to submit to a perl script and then have a second form displayed that displays results, and provides more options to the user; depending on which button they press, the information is relayed back to my program (same script but different subroutine, is how that would work, I guess?), the data is handled in the backend, and then the process starts over.

if you need a diagram,

form_1 -input-> script -> output -> form_2 -> input -> script -> done, repeat at form_1

as far as CGI goes, to format output data, I am aware of HTML::Template, but I'm not sure it's the right tool for the job. Is it?

Replies are listed 'Best First'.
Re: A noobish question about forms
by Anonymous Monk on Jan 30, 2012 at 11:06 UTC
Re: A noobish question about forms
by sundialsvc4 (Abbot) on Jan 31, 2012 at 14:22 UTC

    Yup, this is a very basic question indeed.   Yes, it is a n00b question, but, that’s just as good a place to begin as any other, so let’s get started.

    The name of this game is to figure out how to get a job done while “actually having to figure out” as little as possible.   Well, to understand anything of what any of these tool-makers are saying, naturally you have to understand what they are saying ... so begin, as suggested, by learning how HTML form-processing actually works.   POST/GET, <form> tags, maybe what AJAX is, and so on.   “Speaking the local language, well enough to find the bathroom anyway,” so to speak.   Set your immediate objective aside for a bit; you’ll get to it in a moment, but not yet.   Next, since you are using Perl, proceed by learning about some of the existing Perl packages that are specifically designed for you.   There are literally thousands of them; too many to list.   But one or more of them are absolutely certain to solve either all of, or a very useful part of, what you are setting out to do.   Your goal is to minimize ... as much as possible, to utterly eliminate ... the amount of “original coding” that you need to do, in order to accomplish this decidedly un-original requirement as quickly as possible.

    Actum Ne Agas:   Do Not Do A Thing Already Done.

    Just because there’s a Hall of Mirrors in front of you, it does not mean that you have to stumble through it, to get where you are going.   Instead, look for the very bright trails that were purposely left behind for you by the preceding passers-by.

    The answer is:   Yes.
    The question is:   “Hasn’t somebody else already done that?”

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://950742]
Approved by GrandFather
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (2)
As of 2018-03-25 01:36 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (299 votes). Check out past polls.