Signature from dropdown

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.

Hi @lieels01!

Are you looking to add signmarkers for digital signing with one of our integrations?

Continuing from the code you already wrote, you could add something like this:

{% ic %}
The undersigned, {% input custom.person_option.to_select as:select options:person_options option_values:person_option_values %}, etc.
{% endic %}
{% nic %}
  {% for person in period.directors %}
    {% comment %}match the person chosen via the dropdown{% endcomment %}
    {% if person.id == custom.person_option.to_select %}
      {% capture person_name %}person_name_{{ person.id }}{% endcapture %}
      The undersigned,
      <br><br><br><br><br>
      {% signmarker name:[person_name] %}
      <br><br><br>
      {{ [person_name] }}
    {% endif %}
  {% endfor %}
{% endnic %}

More info can be found in this case.

If this is not what you were looking to achieve, can you elaborate a bit more on what you want the piece of code to do?

Kind regards,
Romy