Addnewinputs
The addnewinput tag is used to sort your collection in Silverfin templating language.
We use an addnewinput tag to allow user sorting information that was stored/added in the collection.
In the example below, we assign our collection to a variable investments and filter it by sorting on a “date”. To make sure this code works it should be between the {% addnewinputs %}/{% endaddnewinputs %} tags.
{% addnewinputs %}
{% assign investments = custom.investments_office_material | sort:"investment_date" %}
{% endaddnewinputs %}
{% stripnewlines %}
{% fori acc in investments %}
{% if forloop.first %}
| Date
| Description
| Value
{% newline %}
|----15%----
|----60%----
|----------:+
{% endif %}
{% newline %}
| {% input acc.investment_date as:date %}
| {% input acc.descr as:text size:mini placeholder:"Description" %}
| {% input acc.value as:currency %}
{% endfori %}
{% endstripnewlines %}
Output

Updated 12 months ago