View Full Version : Form Field Manager

03-02-2009, 11:20 PM
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.


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.


03-02-2009, 11:33 PM
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?

03-02-2009, 11:39 PM
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.