Hello!
What is the syntax to retrieve a row from the HubDB if one of the columns (checkbox) is checked?
I have a module which is only supposed to appear if that specific column is checked.
The column is “banner_event” and I’m trying to figure out how to write it:
{% if row.banner_event … %} ?
Thank you
!!
Hey, @FilipaPF you’re on the right track. after looping the hubdb table field you can access the column if it’s checked using the syntax you provided as an example.
here’s a quick code snippet:
{% set main_rows = hubdb_table_rows(module.hubdb_table) %} {# this is the hubdb table field #}
{% for row in main_rows %}
{% if row.banner_event %}
{# do something #}
{% endif %}
{% endfor %}
.
Thank you @felixmacaspac ! works perfectly now|