I am making a dynamic form using table. My table was like below.
<table border="1">
<tr>
<td>A Label Name</td>
<td>:</td>
<td colspan="4"><!-- Input text --></td>
</tr>
<tr>
<td>Category</td>
<td>:</td>
<td colspan="4"><!-- Select Option value: { both, group 1, group 2 } --></td>
</tr>
<tr>
<!-- Group 1 -->
<td>Group 1</td>
<td>:</td>
<td>- Group 1 Name -</td>
<!-- End of Group 1 -->
<!-- Group 2 -->
<td>Group 2</td>
<td>:</td>
<td>- Group 2 Name -</td>
<!-- End of Group 2 -->
</tr>
How to hide group 1 td element, so that the table will only display the td of group 2, without having to delete or clear that td elements by using javascript?
I have tried to add span tag to group them and then styling to display to become none.
<span style="display:none">
<!-- Group 1 -->
<td>Group 1</td>
<td>:</td>
<td>- Group 1 Name -</td>
<!-- End of Group 1 -->
</span>
But nothing happened. Any idea?