Default text box with fori

Hi

I’m working on a template for Fintrax, but we have a problem with the defaults of a textbox.
When you press enter in a text box, a new text box appears, but the default text remains automatically the same (without the enter). This is not exactly the biggest problem. The problem is if you want to delete this textbox (by supposedly deleting the text in the default) then this will not work. Both textboxes remain in the template.

The code for this problem is shown below:

{% stripnewlines %}
|----+
{% newline %}
|
{% fori act in custom.activities %}
  {% assign description = act.description %}
  {% assign name = act.name %}
  {% if description == blank and name == blank %}
    {% newline %}
    |  {% ic %}**{% input act.name default:"Extra title" %}**{% endic %}
    {% newline %}
    |{% ic %}{% input act.description as:text default:"Extra description" %}{% endic %}
    {% else %}
    {% newline %}
    |  **{% input act.name default:"Extra title" %}**
    {% newline %}
    |{% input act.description as:text default:"Extra description" %}
  {% endif %}
{% endfori %}

{% endstripnewlines %}

Kind regards
Joachim

Hi Joachim

Thank you for your question.

Default values are shown in export, placeholder values - not.
In fori loop is better to use placeholders, code is shorter. Please try this code:

{% stripnewlines %}
|----+
{% newline %}
|
{% fori act in custom.activities %}
    {% newline %}
    |  **{% input act.name placeholder:"Extra title" %}**
    {% newline %}
    |{% input act.description as:text placeholder:"Extra description" %}
{% endfori %}

{% endstripnewlines %}

Please let me know if this solves your task.
Thanks.

Jelena

Hi Jelena

Thank you very much for your quick response Jelena. This has solved my problem.

Kind regards
Joachim