Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Form Field Manager

    Hey Guys,

    I'm looking for a simple script that allows a admin to control the content in multiple drop down lists contained in a php form that emails results to a certain address. I want to build this without using a database if possible.

    One idea I had was to use a text file to hold the drop down information. The admin would simply edit the text files which populates the form. The problem is, I need the drop down menus to display based on the previous drop down in which is it dependent on.

    Example:

    Text Files: Pork.txt, Beef.txt, Poultry.txt

    Drop down 1: Pork, Beef, Poultry

    Drop down 2 (Contents of Poultry.txt): Chicken, Turkey, Quail

    Drop down 2 would be the menu that loads the text file. If you chose Beef, a different drop down would display and populate based on the beef.txt file.

    The admin of the script would simply be a PHP text file editor. Pretty simple.

    Anyone done anything like this before? I'm also willing to pay for this script to be built.

    Thanks!

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    Your plan seems quite reasonable, and won't be hard to implement. You'll want to become familiar with the file handler functions; fopen, fwrite, etc.

    I guess the tricky part will be making it flexible. How will your admin assign a sublist to its parent? Will the admin have to put markers in the text file indicating which sublist should be displayed based on which parent is chosen? And how do you build the flexibility in to give the option to dive down any (reasonable) number of levels?

  • #3
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The parent menus will all be hard coded and will not change. Although, in the future, I may add additional menus. The parent menu would have to invoke the text file to load some how. But again, I'm not sure the text file option is the best way to go here.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •