The selected attribute gives me the default for the field, which is fine.
However, if there is a value stored in the database, I would like this to become the new default.
As per my code example above:
If "Drilled" is the default, but for the retrieved record "Spring" is already associated with the record, I would like "Spring" to be the default. If there is no value present then "Drilled"...
User Profile
Collapse
-
Guess I should clarify better. Reset to default on a new form is not a problem. However, if I pull the same form id up again the value on the form changes from what was previously set to default.
What I need to occur is that value that is stored in the "water_sour ce" field of the MySQL record becomes the new default for the field.
Could someone direct me to a resource or suggest how the code could be...Leave a comment:
-
Using MySQL value as default for Drop Down List of Form
Greetings:
A newbie question. I have a form that is completed and every time we save the form the value of the drop down list is reset to default. I presume you need to do a query of the database and challenge with drop down list to make that the primary field.
Here is the code I have so far:
...Code:<td colspan="2" id="c180">Water Source: <select name="water_source"
No activity results to display
Show More
Leave a comment: