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

automatic form creation database

by Murcia (Monk)
on Mar 26, 2004 at 12:26 UTC ( [id://339992]=perlquestion: print w/replies, xml ) Need Help??

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

Hi Conferes,

i have to create cgi-form-pages to insert data in the corresponding database tables.
It should be possible to build this forms automatically, or? Is there a module?

Thanks
Murcia

Replies are listed 'Best First'.
Re: automatic form creation database
by Happy-the-monk (Canon) on Mar 26, 2004 at 12:37 UTC

    The modules you should look at are CGI for the Web and DBI for the Database.

    The question you are asking has been asked before, and the task you want to accomplish has been done very often. If you have a look at the pages and Tutorials here and just go read a bit, you will find everything you need.

    Cheers, Sören

      What do you think about create online forms with database backend using free online object oriented database http://www.MyTaskHelper.com ?
      Hi, Sören, I know CGI and DBI quite well, but till now I have notseen a module to build a form out of a table, just by saying: Here is the table and now write the html code ... OR?????

        Murcia, imagine, there was the Module you are looking for. Tell me, how you would proceed to finding it.

        If you actually have no idea, I will certainly help you along.

        (You didn't mention that you know foresaid modules, would be a good idea to specify in your question next time...)

Re: automatic form creation database
by calin (Deacon) on Mar 26, 2004 at 13:29 UTC

    First, I must say I never liked the "form" model of DB/GUI style programs. It's a horrendous VB-istic oversimplification. You trade writing a few less lines of code for enormous loss in flexibility.

    A templating system for uniform look and feel of all application screens - yes. But forms - no sir. With forms you're shortcircuiting the immense possibilities of dataflow processing (one of Perl's best) with an inane one-to-one correspondence between GUI elements and DB columns. And forms in their basic incarnation aren't working with complex queries or joins. Some vendors "solved" this problem by implementig "inserable updateable views" on the DB side !

    </RANT>

    Try your luck on CPAN (search with the keywords database forms etc.)

Re: automatic form creation database
by jonnyfolk (Vicar) on Mar 26, 2004 at 13:53 UTC
    I'm not aware of a module (which doesn't mean there isn't one (:). It all depends on the information you'd like to get into the form, of course, but I would have thought that if you input your db fields as  'name' attributes, and set out a template based on HTML::Template , setting (die_on_bad_params => 0) then you could create a script which fills out the template according to the name parameters supplied.

    An explanation of the use of HTML::Template by the author can be found here

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://339992]
Approved by jonnyfolk
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2024-03-29 04:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found