В модальном я попытался добавить 3 текстовых поля подряд в виде сворачиваемых. Есть кнопка под названием добавить еще, если я нажму на эти 3 текстовых поля, они должны отобразиться во второй строке. Я пробовал использовать пример #collapse в модальном режиме, но он не работал. поток, учреждение и год прохождения должны быть свернуты при нажатии кнопки добавления.
<!-- Modal -->
<div class = "modal fade" id = "myModal" role = "dialog">
<div class = "modal-dialog">
<!-- Modal content-->
<div class = "modal-content">
<div class = "modal-body">
<div class = "panel panel-default">
<div class = "panel-body">
<button type = "button" class = "close" data-dismiss = "modal">
<font color = "black">
<a href = "hrtoolkit.html" style = "color: darkred">
<span style = "color: darkred;">×</span>
</a>
</font>
</button>
<label class = " col-sm-4">Edit Save</label>
<br />
<div class = "container">
<div class = "row">
<div class = "col-md-6">
<div class = "form-body">
<br />
<table class = "table table-responsive">
<tbody>
<tr>
<td class = "outside" style = "border-style: none; border-bottom-style: none; ">
<input type = "text" class = "form-control" placeholder = "10th" />
</td>
</div>
</div>
<td class = "outside" style = "border-style: none; border-bottom-style: none;">
<input type = "text" class = "form-control" placeholder = "Degree" /> </td>
<td class = "outside" style = "border-style: none; border-bottom-style: none;">
<button type = "button" class = "btn btn-default " data-toggle = "collapse" data-target = "#collapseExample" style = "font-size: 9px; background-color: #ccc; font-weight: bold;">Add Another
</button>
</tr>
<div class = "collapse" id = "collapseExample">
<tr>
<td class = "outside" style = "border-style: none; border-bottom-style: none; ">Stream
<input type = "text" class = "form-control" placeholder = "Stream" />
</td>
<td class = "outside" style = "border-style: none; border-bottom-style: none;">Institution
<input type = "text" class = "form-control" placeholder = "Institution" />
</td>
<td class = "outside" style = "border-style: none; border-bottom-style: none;">Yr of Passing
<input type = "date" class = "form-control" id = "resizedTextbox" placeholder = "Yr of Passing"
/>
</td>
</tr>
</div>
<tr>
<td class = "outside" style = "border-style: none; border-bottom-style: none; ">Stream
<input type = "text" class = "form-control" placeholder = "Stream" />
</td>
<td class = "outside" style = "border-style: none; border-bottom-style: none;">Institution
<input type = "text" class = "form-control" placeholder = "Institution" />
</td>
<td class = "outside" style = "border-style: none; border-bottom-style: none;">Yr of Passing
<input type = "date" class = "form-control" id = "resizedTextbox" placeholder = "Yr of Passing"
/>
</td>
</tr>
<tr>
<td class = "outside" style = "border-style: none; border-bottom-style: none;">State
<input type = "text" class = "form-control" placeholder = "State" />
</td>
<td class = "outside" style = "border-style: none; border-bottom-style: none;">Country
<input type = "text" class = "form-control" placeholder = "Country" />
</td>
<td class = "outside" style = "border-style: none; border-bottom-style: none;">
<br>
<input type = "file" class = "custom-file-input">
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>


![Безумие обратных вызовов в javascript [JS]](https://i.imgur.com/WsjO6zJb.png)


Он работает, см. Этот пример
https://codepen.io/creativedev/pen/YvqrbB
Проблема в том, что вы использовали тег div в таблице. Просто передайте класс коллапса class = "collapse" id = "collapseExample" в tr
<tr class = "collapse" id = "collapseExample">
<td class = "outside" style = "border-style: none; border-bottom-style: none; ">Stream
<input type = "text" class = "form-control" placeholder = "Stream" />
</td>
<td class = "outside" style = "border-style: none; border-bottom-style: none;">Institution
<input type = "text" class = "form-control" placeholder = "Institution" />
</td>
<td class = "outside" style = "border-style: none; border-bottom-style: none;">Yr of Passing
<input type = "date" class = "form-control" id = "resizedTextbox" placeholder = "Yr of Passing" />
</td>
</tr>