Issue
as 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
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>
Answered By - Willem Van Onsem
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.