Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

How to implement dynamic form fields?

by Legg83 (Novice)
on Mar 08, 2003 at 00:50 UTC ( [id://241308]=perlquestion: print w/replies, xml ) Need Help??

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

I would like to make a Contact information script. I will be using straight text file databases. I would like for the script to preform as thus: DYNAMIC form fields. Say I have, name, email, phone, and address. Say I want the administrator to be able to log in and change it so that he can move the display order up / down, AND he can ADD his own form (say he wants it to also be able to display "cell phone number", he can add that, and it will automaticly recreate the databases for the new field. Say I also want to be able to have a list of categories of contacts, and maybe subcategories, and maybe sub sub categories.. etc etc etc.

My question to the monks is, how would you suggest I create such a system? I am still by far a newbie at perl. I believe I have what it takes to get this done, but I need some guidance.

edited: Sun Mar 9 14:53:59 2003 by jeffa - title change (was: Need some pointers on how to...)

Replies are listed 'Best First'.
Re: How to implement dynamic form fields?
by artist (Parson) on Mar 08, 2003 at 02:54 UTC
    Some help...
    • form.xml file to create form fields
    • CGI inteface for Admin to tweak this file with Bundle::XML and create database.xml to define the storage format
    • Generate the actual form with form.xml and may be with CGI::XMLForm
    • Use database.xml to create database.txt file from the fields obtained from form via CGI.pm
    Hope that provides good starting points.

    artist

Re: How to implement dynamic form fields?
by dorko (Prior) on Mar 08, 2003 at 01:54 UTC
Re: How to implement dynamic form fields?
by tall_man (Parson) on Mar 08, 2003 at 01:41 UTC
    Usually perlmonks asks that you show some effort towards an answer, such as writing some source code, and then we can provide some guidance and suggestions.

    Do you mean a CGI form? The module CGI.pm would be useful. Also check out the DBI-related modules, which are for generic database access. The modules DBD:CSV and DBD:File are for text-only databases (the latter is an abstract base class, so I think the former would be more to your liking).

Re: How to implement dynamic form fields?
by shushu (Scribe) on Mar 20, 2003 at 13:49 UTC
    Hi,
    I believe I understand your question.
    You know what you want - a dynamic form creator, and you don't want to write this form creator by yourself.
    All of the modules mentioned are good, and will help - if you decide to write the project by your own.

    But - if there is something ready - you want to use it.
    I am in the same situation, and with the same needs. I found this node by searching "dynamic form", since I need this kind of a tool as well.
    Do you have any direction ?
    TIA,
    shushu

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-25 19:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found