Variable amount of custom variables

Hi there,

I’ve got the following issue: in a template that I’m making (‘aandeelhoudersregister’), a first table is created where a variable amount of shareholders are defined (for example 4). On the basis of this information, a further table is created per shareholder (here 4). Up to here, everything is ok.

Now, in each shareholder table, a variable amount of transactions are recorded whereby these actions have to be selected among predefined values (27 to be exact). For certain actions, additional information (where, who, when …) has to be inputted by means of custom fields (eg custom.option1.whendone). Now, for each shareholder, this information is new. How can I make a distinction between the values ‘custom.option1.whendone’ for two shareholders if this option is selected for (eg) shareholders 2 and 4 (if I choose ‘custom.option1.whendone’ for both shareholders, they will get the same value, which is not the aim of course)?

Please tell me if I’m not making myself clear here … thanks!


{% fori aandeelhouder in custom.aandeelhouders %}
  {% input %}
{% endfori %}

{% for aandeelhouder in custom.aandeelhouders %}
  {% input custom.[aandeelhouder.key].option1_whendone %}
{% endfor %}

This should work! :slight_smile:

Hi Sam,

OK thanks.

I’ll give it a try!