Creating a dropdown to filter data from HubDB table
Hi! Working on creating a drop down to sort hub db values based on price. Can't seem to find a solution to sort based on value ($100,000 increments). We created a similar dropdown to filter by neighborhoods, but when it comes to numerical values, we are having some issues. See page for referencing: https://www.creativehci.com/properties.
Dropdown for sorting by neighborhood has following code. hoping to tweak this for numerical values by price
<div class="properties-container"> <div class="select-container"> <select class="resources-select"> <option>Select Neighborhood</option> <option value="all">All Neighborhoods</option> {% set types = hubdb_table_column(966992, "neighborhood_type").options %} {% for choice in types %} {% set type_list = type_list~choice.id|list%} <option value="{{ choice.name|lower|replace(' ', '-') }}">{{ choice.name }}</option> {% endfor %}