I'm currently building a custom module using hubDB and would like to know if is possible to show the printing value of a "Multi-select" column that I created. Right now when I render the code I get the follow:
So a multi select column field will return a list of dictionaries where each selection is its own dictionary. So just like you're looping through the table rows, you'll also need to loop through the dictionaries in that list. Once inside our nested loop, we can access the keys from those dictionaries. So in your case, that might look something like this:
{% set gallery = hubdb_table_rows('1111111') %}
{% for scimg in gallery %}
<div class="options">
{% for item in scimg.project_type %}
<p class="display-options">{{ item.name }}</p>
{% endfor %}
</div>
{% endfor %}
And that will print what you're looking for. Let me know if you have any questions about it.
So a multi select column field will return a list of dictionaries where each selection is its own dictionary. So just like you're looping through the table rows, you'll also need to loop through the dictionaries in that list. Once inside our nested loop, we can access the keys from those dictionaries. So in your case, that might look something like this:
{% set gallery = hubdb_table_rows('1111111') %}
{% for scimg in gallery %}
<div class="options">
{% for item in scimg.project_type %}
<p class="display-options">{{ item.name }}</p>
{% endfor %}
</div>
{% endfor %}
And that will print what you're looking for. Let me know if you have any questions about it.