Hi!
I wrote the below code to have a dropdown menu created with all the director and would now actually like to have the signature appear of the selected name in the input, but I can’t quiet seem to get there. Can you perhaps have a look at give a possibility on how I should be able to have the signature of the selected person appear? Thank you in advance!
{% comment %}Creating the list of directors{% endcomment %}
{% for person in period.directors %}
{% comment %}Assigning the type of the shareholder - "legal" or "nature"{% endcomment %}
{% assign default_type = "" %}
{% if person.custom.represented_by_name != blank %}
{% assign default_type = "legal" %}
{% else %}
{% assign default_type = "nature" %}
{% endif %}
{% assign type = person.custom.type | default:default_type %}
{% if type == "nature" %}
{% assign words = person.name | split: ' ' %}
{% assign lastname = "" %}
{% assign person_first_name = "" %}
{% for word in words %}
{% if forloop.last %} {% comment %}correct for syncs like adminis{% endcomment %}
{% assign person_first_name = word %}
{% else %}
{% assign lastname = lastname | append:" " | append:word %}
{% endif %}
{% endfor %}
{% capture person_last_name %}{{ lastname | strip }}{% endcapture %}
{% assign first_name = person.custom.first_name | default:person_first_name %}
{% assign last_name = person.custom.last_name | default:person_last_name %}
{% capture full_name %}{{ first_name }} {{ last_name }}{% endcapture %}
{% else %}
{% capture full_name %}{{ person.name }}{% endcapture %}
{% endif %}
{% comment %}Creating list of shareholders to display in dropdown{% endcomment %}
{% assign person_options = person_options | append:full_name | append:"|" %}
{% assign person_option_values = person_option_values | append:person.id | append:"|" %}
{% comment %}Create new dynamic variable{% endcomment %}
{% capture person_name %}person_name_{{ person.id }}{% endcapture %}
{% assign [person_name] = full_name %}
{% endfor %}
The undersigned, {% input custom.person_option.to_select as:select options:person_options option_values:person_option_values %}, etc.