I am trying to build a choice field into a module that will let a user select a row from a hubdb table to pass into the module via a choice field. I have successfully built the loop to create the array, but the choice field rejects the input and I can't determine why.
{% set table = hubdb_table_rows( XXXXXX ) %}
{% set sections = [] %}
{% for row in table %} {{ sections.append(row.content_id) }} {% endfor %}
I think there is issue with type of variable used for choices, Instead of array use string variable and append string in it. and after that assign to choices attribute.