Filtering a HubDB based on a modules input

SOLVE
Philip_Marsh
Contributor

Hi,

I have a HubDB set up, which has a multi-select colum. 

I want my module to filter our specific rows in the HubDB based on what I entire into a text field on the page. 

Using a text field, what I want to happen is that on the page this module gets added too, The code I have returns blank. I don't know how to compare the item.name to the module.category value.

{% set category = hubdb_table_rows(module.faq_table, '&orderBy=order') %}
      {% for row in category %}
			
			{% for item in row.category_select %}		
			{% if item.name == modul.category %}
      <div class="shadow">
        <div class="acc-btn" data="img{{loop.index}}">
          <h3 {% if loop.index == 1 %} class="selected" {% endif %}><span>{{ row.title }}</span>
            <img class="plus" src="https://cdn2.hubspot.net/hubfs/4351639/2019/assets-may-2019/plus-bold.svg" alt="plus symbol">
            <img class="minus" src="https://cdn2.hubspot.net/hubfs/4351639/2019/assets-may-2019/minus-bold.svg" alt="minus symbol">
          </h3>
        </div>
        <div class="acc-content {% if loop.index == 1 %} open {% endif %}">
          <div class="acc-content-inner">
            {{ row.content }}
          </div>
        </div>
      </div>
			
	{% endif %}
	{% endfor %}
      {% endfor %}

 

0 Upvotes
1 Accepted solution

Accepted Solutions
Philip_Marsh
Solution
Contributor

Ignore me. Friday mornings. I realised that I mispelt module. That fixed the problem

View solution in original post

2 Replies 2
Philip_Marsh
Solution
Contributor

Ignore me. Friday mornings. I realised that I mispelt module. That fixed the problem

View solution in original post

dennisedson
Community Manager

@Philip_Marsh ,

we will let it slide this one time. 

But we are watching you 👁️‍🗨

Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content
0 Upvotes