Topic: Select input defaults to NIL when using Edit
I have a form with a drop down box that allows a user to select predefined input instead of typing in new data....everything works fine here and the users input gets saved to the database. The problem comes when the user wants to change their prior input and goes to the "Edit" page. All of the user's previous answers are there except for their previous selection with the drop down box, that has been reset to the top choice. I would like to have the select menu default to the users previously stored input instead of changing everytime to the top choice in the menu.
Here is the code I'm using. For instance, if a user previously selected Option 2 from this drop down and goes in to try and edit it, his previous choice is lost and the Edit form shows
the first choice in the list (option value="") instead of what is stored in the database for the users previous Catagory choice.
<select name ="link[catagory]">
<option value="Option 1">Option 1
<option value="Option 2">Option 2
<option value="Option 3">Option 3
Any help or guidance would be greatly appreciated!