I want to state to begin with, I am a bad coder, so there's a good chance this is a very simple thing I'm missing. That said, I'm trying to build a custom module based on the real estate listing example using hubdb http://designers.hubspot.com/docs/tutorials/how-to-build-a-real-estate-listing-with-hubdb . I couldn't get that example to work either, same problem.
The problem I'm running into is no matter what I select, the displayed entries never filter. Here's my code:
<!-- set the filter by drop down, search bar, and submit button -->
<div> <form id="form_id" method="get">
<div> <h4>FILTER BY LISTING TYPE: </h4> <select name="type" form="form_id" onChange="this.form.submit()"> <option value="show-all">Show All</option> {% set types = hubdb_table_column(658781, "type").options %} {% for choice in types %} {% set type_list = type_list~choice.id|list%} {% if choice.id == request.query_dict.type%} <option selected="selected" value="{{ choice.id }}">{{ choice.name }}</option> {% else %} <option value="{{ choice.id }}">{{ choice.name }}</option> {% endif %} {% endfor %} </select> </div>
</form> </div>
{% set table = hubdb_table_rows(658781, queryparam)%}
{% if table == [] %} <p class='align-center'>Sorry, no listings found for that Search. Try changing your fiter and search again.</p> {% else %} {% for row in table %} <div class="team-member-card-container {{ widget.cards_in_row }}"> <div class="team-member-card"> <div class="image-container"> <img src="{{ row.image_url.url }}" width="500" {% if row.image.width > row.image.height %}class="landscape"{% endif %} alt="{{ row.name }} Headshot"> </div> <div class="team-member-info"> <h3>{{ row.property_name }}</h3> <h4>{{ row.state }}</h4> <p>{{ row.description }}</p> <p>${{ row.price }}</p> <p>Contact {{ row.contact }} if interested.</p> <p></p> </div> </div> </div> {% endfor %} {% endif %}