{% if survey and fieldname and stepCode and surveyMode %}
{% if survey.hasFieldByStepCode(fieldname,stepCode,surveyMode) %}
{% set answer = getUserAnswer(object, fieldname) %}
{% set text = getUserAnswerLabel(object, fieldname) %}
{% set textClass="" %}
{% set suffix = "" %}
{% if gettype(answer) == 'boolean' %}
{% if answer =='Oui' or answer =='1' %}
{% set text = "Oui" %}
{% set textClass="text-success" %}
{% else %}
{% set text = "Non" %}
{% set textClass="text-danger" %}
{% endif %}
{% endif %}
{% if type is defined %}
{% if type == "amountCHF" %}
{% if text > 0 %}
{% set suffix = ' CHF' %}
{% set textClass = "text-success" %}
{% endif %}
{% endif %}
{% if type == "amountEUR" %}
{% if text > 0 %}
{% set suffix = ' EUR' %}
{% set textClass = "text-success" %}
{% endif %}
{% endif %}
{% if type == "days" %}
{% if text > 0 %}
{% set suffix = ' jours' %}
{% set textClass = "text-success" %}
{% endif %}
{% endif %}
{% if type == "months" %}
{% if text > 0 %}
{% set suffix = ' mois' %}
{% set textClass = "text-success" %}
{% endif %}
{% endif %}
{% if type == "km" %}
{% if text > 0 %}
{% set suffix = ' km' %}
{% set textClass = "text-success" %}
{% endif %}
{% endif %}
{% if type == 'date' %}
{% set text = text|date('d/m/Y') %}
{% endif %}
{% if type == 'percent' %}
{% set suffix = ' %' %}
{% set text = text|number_format(0,',','') %}
{% endif %}
{% endif %}
{% if label is defined %}
<td class="col-5"><b class="cut-text-300">{{ label }}</b> :</td>
{% endif %}
<td><span class="multiline {{ textClass }}">{{ text }}{{ suffix }}</span></td>
{% endif %}
{% endif %}