Reduce the amount of code lines

Hi,

I am building a template where I will have many questions and I am going to use the below code for each of the questions.

Can you please advise if I can reduce the amount of lines that i will have in my code ?

{% capture "header_title" %}|--40%--|--30%--|--30%--##{% endcapture %}
{% stripnewlines %}
{{header_title}}{% newline %}
  |**Output**
{% newline %}
{% comment %}<-----------------------------------------------------------------------Transport and related questions---->{% endcomment %}
  |**Transport and related questions**
  | **YES or NO or N/A or Not Known** 
  |**Add note**
{% newline %}  
  |Transport related question 1
  | {%ic%}Yes {% input custom.client.A1yes as:boolean %}  
          No {% input custom.client.A1no as:boolean %} 
          N/A {% input custom.client.A1na as:boolean %}
          Not Known {% input custom.client.A1nk as:boolean %}
    {%endic%}
      {% if   custom.client.A1yes == "false"  and custom.client.A1no == "false" and custom.client.A1na =="false" and custom.client.A1nk =="false" %}  {::warningtext} Choose one option {:/warningtext}
      {% elsif   custom.client.A1yes == "true"  and custom.client.A1no == "true" and custom.client.A1na == "true" and custom.client.A1nk == "true" %} {::warningtext} Select only one {:/warningtext}
        {% elsif   custom.client.A1yes == "true"  and custom.client.A1no == "true" and custom.client.A1na == "true" and custom.client.A1nk == "false" %} {::warningtext} Select only one {:/warningtext}
          {% elsif   custom.client.A1yes == "true"  and custom.client.A1no == "true" and custom.client.A1na == "false"  and custom.client.A1nk == "true" %} {::warningtext} Select only one {:/warningtext}
            {% elsif   custom.client.A1yes == "true"  and custom.client.A1no == "false" and custom.client.A1na == "true" and custom.client.A1nk == "true" %} {::warningtext} Select only one {:/warningtext}
              {% elsif   custom.client.A1yes == "false"  and custom.client.A1no == "true" and custom.client.A1na == "true"  and custom.client.A1nk == "true"%} {::warningtext} Select only one {:/warningtext}
                {% elsif   custom.client.A1yes == "true"  and custom.client.A1no == "true" and custom.client.A1na == "false"  and custom.client.A1nk == "false"%} {::warningtext} Select only one {:/warningtext}
                  {% elsif   custom.client.A1yes == "false"  and custom.client.A1no == "false" and custom.client.A1na == "true"  and custom.client.A1nk == "true"%} {::warningtext} Select only one {:/warningtext}
                    {% elsif   custom.client.A1yes == "true"  and custom.client.A1no == "fasle" and custom.client.A1na == "false"  and custom.client.A1nk == "true"%} {::warningtext} Select only one {:/warningtext}
                      {% elsif   custom.client.A1yes == "false"  and custom.client.A1no == "true" and custom.client.A1na == "true"  and custom.client.A1nk == "false"%} {::warningtext} Select only one {:/warningtext}
      {% endif %}
    {% if custom.client.A1yes == "true"%} {%nic%}&nbsp;Yes  {%endnic%}
      {% elsif custom.client.A1no == "true" %} {%nic%} No  {%endnic%}
        {% elsif custom.client.A1na == "true" %} {%nic%} N/A  {%endnic%}
          {% elsif custom.client.A1nk == "true" %} {%nic%} Not Known  {%endnic%}
    {% endif %}
  |{% input custom.add.note1 as:text placeholder:'Add Note' %}
{% newline %}  
  {% endstripnewlines %}

Thank you and I wish you a happy new Year.

Stefan

Hi Stephan,

To reduce the amount of code I would suggest to use a dropdown input variable, with following options: Yes, No, N/A, Not Known.

By adding the required:true attribute, the user will be forced to choose between one of them to reconcile the template.

Best regards,

Michiel