Advanced [Exercise 4: Dropdown with data from drop] (Training slides exercise)

  • Create an input table where name investor, type and amount can be entered
  • Show all investors in a dropdown

|490px;x344px;

Solution:

{% stripnewlines %}
| Investors name
| Investor type
| Amount
{% newline %}
|------
|------
|------:+
{% newline %}
{% fori investor in custom.investors %}
  | {% input investor.name %}
  | {% input investor.type %}
  | {% =$3+input investor.value as:currency %}
  {% newline %}
{% endfori %}
|
|
|__^^ {{ $3 | currency }} ^^__
{% endstripnewlines %}
{% assign investor_array = "" %}
{% for investor in custom.investors %}
  {% assign investor_array = investor_array | append:investor.name %}
  {% unless forloop.last %}
    {% assign investor_array = investor_array | append:"|" %}
  {% endunless %}
{% endfor %}
{% input custom.selection.companies as:select options:investor_array %}