Hi,
If i do not have any text in the custom.box.b1 once i preview the code it shows an empty space between “Sales Ledger” and the Header.
Is there a way i can prevent that empty space from appearing ?
Thank you for your help.
Stefan
{% ic %}{% input custom.tick.section_A as:boolean %}{% endic %}{% if custom.tick.section_A %}{::font size="m"}**{% assign nbr = nbr | plus:1 %}{{ nbr }}) Sales ledger**{:/font}{% else %}|{% ic %}{::font size="m"} Sales ledger{:/font}{% endic %} {% endif %}
{% if custom.tick.section_A %}
{% input custom.box.b1 as:text size:mini default:b1 %}{% fori item in custom.section_A %}
**{% input item.header placeholder:'Header' %}**{% input item.attachment1 as:file_collection %}
{% input item.description as:text placeholder:'Description' %}```
Hi @Stefan.Temelie,
I can’t really see any issue with the code you sent. In preview I do not have any unnecessary gap between Sales ledger and Header. However, if you want to eliminate the unnecessary line breaks between the title and header you could use {% stripnewlines %}{% endstripnewlines %} and {% newline %} at the end of each line. If you don’t want to show an input box in preview if it is empty use ‘ifi’ tag. See an example of the code below:
{% stripnewlines %}
{% ic %}{% input custom.tick.section_A as:boolean %}{% endic %}
{% if custom.tick.section_A %}
{::font size="m"}**{% assign nbr = nbr | plus:1 %}{{ nbr }}) Sales ledger**{:/font}{% newline %}
{% else %}
|{% ic %}{::font size="m"} Sales ledger{:/font}{% newline %}{% endic %}
{% endif %}
{% if custom.tick.section_A %}
{% ifi custom.box.b1 != blank %}{% input custom.box.b1 as:text size:mini default:b1 %}{% newline %}{% endifi %}
{% fori item in custom.section_A %}
**{% input item.header placeholder:'Header' %}**{% input item.attachment1 as:file_collection %}{% newline %}
{% input item.description as:text placeholder:'Description' %}{% newline %}
{% endfori%}
{% endif %}
{% endstripnewlines %}
Let me know if you have any further questions.