http://qs1969.pair.com?node_id=367614

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

I am creating a User Interface, using HTML forms. I have to prepopulate the values of the form fields. At the server side, I am using PERL. Can you please help? Thanks, Anu

Replies are listed 'Best First'.
Re: Perl and HTML
by bassplayer (Monsignor) on Jun 17, 2004 at 13:55 UTC
    Hello akapoor,

    I recommend using a templating system like HTML::Template or Template, which is part of the Template Toolkit. They are will do what you are asking and give you flexibility for later. HTML::Template is lighter, and might be a good place to start. By the way, the language is Perl (as you have it in your title) and not PERL (as you have it in your post). There is a difference. :-)

    bassplayer

Re: Perl and HTML
by davidj (Priest) on Jun 17, 2004 at 14:12 UTC
Re: Perl and HTML
by neniro (Priest) on Jun 17, 2004 at 14:41 UTC

    I am creating a User Interface, using HTML forms. I have to prepopulate the values of the form fields.

    There is no way to populate classic HTML-forms directly. You have to generate them on the server to be able to do this. CGI.pm is the standard module for this task. A template-system like HTML::Template helps you to separate code from content.

    Give us an example (html, code) of what you like to do, so whe can suggest you an easy way to do it.

    neniro

Re: Perl and HTML
by bibo (Pilgrim) on Jun 17, 2004 at 13:52 UTC
    Sure. Here are a couple starters:

    google Looking for "fillinform"

    cpan , the Comprehensive Perl Archive Network

    More info about the web server software, versions, operating systems, etc will be helpful for more detailed suggestions, but this should get you started.

Re: Perl and HTML
by kutsu (Priest) on Jun 17, 2004 at 14:49 UTC

    Since nobody meantioned it: Super Searching for CGI, HTML, HTML Forms, HTML::Template, CSS, LWP, etc... will give several nodes on perl and the web and look at the Tutorials section (under CGI/Network Programming) for several good tutorials like Ovid's Web Programming Course.

    "Cogito cogito ergo cogito sum - I think that I think, therefore I think that I am." Ambrose Bierce