Is it possible to have a dynamic placeholder?
With this I mean: that a persons name (which is inputted with an input-field earlier in the code) is visible?
Or can you only have a pre-set placeholder as a possibility?
Hi @Loic_Cogels ,
It’s indeed possible to make the placeholder or default dynamic. In the example below the placeholder for the text information field will be based on the input of the name variable.
{% stripnewlines %}
| Asset
| Information
{% newline %}
|--------:
|--------:+
{% newline %}
{% fori asset in custom.assets %}
|{% input asset.name placeholder:"Asset" %}
{% if asset.name != blank %}
{% capture asset_information_placeholder %}Enter information about {{ asset.name }}{% endcapture %}
{% else %}
{% capture asset_information_placeholder %}{% endcapture %}
{% endif %}
|{% input asset.information as:text placeholder:asset_information_placeholder %}
{% newline %}
{% endfori %}
{% endstripnewlines %}
Kind regards,
Michiel