Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

get data from database html select option django

<select name="food_status">
	{% for id, choice in order.FoodStatus %}
		<option value="{{ id }}"{% if order.food_status == id %} selected="selected"{% endif %}>{{ choice }}</option>
    {% endfor %}
</select>

https://stackoverflow.com/questions/56196937/select-data-from-drop-down-list-and-save-it-to-database-in-django
 
PREVIOUS NEXT
Tagged: #data #database #html #select #option #django
ADD COMMENT
Topic
Name
5+6 =