CMS Development

Philip_Marsh
Colaborador(a)

Filtering a HubDB based on a modules input

resolver

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 Avaliação positiva
1 Solução aceita
Philip_Marsh
Solução
Colaborador(a)

Filtering a HubDB based on a modules input

resolver

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

Exibir solução no post original

2 Respostas 2
Philip_Marsh
Solução
Colaborador(a)

Filtering a HubDB based on a modules input

resolver

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

dennisedson
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Filtering a HubDB based on a modules input

resolver

@Philip_Marsh ,

we will let it slide this one time. 

But we are watching you 👁️‍🗨

0 Avaliação positiva