Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

using if is giveing me different results in the same cod

enter image description hereas show in pic, why is this happen to ( Iron – Fe )( Carbon – C)( Nitrogen – N)( Phosphors- P)
only the ( Sulfur – S) is working good whitout problem
my html cod is:

{% if object.Iron_Fe != '-' %}
            <tr type="hidden>
                <td style="text-align:left">Iron - Fe</td>
                <td>{{ object.Iron_Fe }}</td>
            </tr>
            {% endif %}


            {% if object.Carbon_C != '-' %}
            <tr type="hidden>
                <td style="text-align:left">Carbon - C</td>
                <td>{{ object.Carbon_C }}</td>
            </tr>
            {% endif %}

            {% if object.Nitrogen_N != '-' %}
                <tr type="hidden>
                    <td style="text-align:left">Nitrogen - N</td>
                    <td>{{ object.Nitrogen_N }}</td>
                </tr>
            {% endif %}
{% if object.Phosphorus_P != '-' %}
                <tr type="hidden>
                    <td style="text-align:left">Phosphorus - P</td>
                    <td>{{ object.Phosphorus_P }}</td>
                </tr>
            {% endif %}

            {% if object.Sulfur_S != '-' %}
                <tr type="hidden">
                    <td style="text-align:left">Sulfur - S</td>
                    <td>{{ object.Sulfur_S }}</td>
                </tr>
            {% endif %}

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

For all atoms except the sulpher, you forgot to close the attribute with type="hidden":

<tr type="hidden">  <!-- ← add " at the end of hidden -->
    …
</tr>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading