Need help with formsets and javascript

I have spent a while trying to write a script to add my django form to a new line so I can save multiple forms at once. if anyone could help me with a script that would be awesome, completely lost


{% extends 'containers/base.html' %}

{% block body %}
    <h3 class="m-4">All Containers</h3>
    <div class="row">
        <div class="col-12">
            {% if success %}
            <div class="alert alert-success" role="alert">
                Container/s have been added successfully.
                <a href="{% url 'index' %}" class="alert-link">Go to Home Page.</a>
            </div>
            {% else %}
            <div class="card bg-light mb-3">
                <div class="card-header">Add Containers</div>
                <div class="card-body">
                    <p class="card-text">
                        <div class="table-responsive">
                            <table class="table table-hover">
                                <thead>
                                    <tr>
                                    <th scope="col" class="text-center">Company Name</th>
                                    <th scope="col" class="text-center">Container Number</th>
                                    <th scope="col" class="text-center">Driver In</th>
                                    <th scope="col" class="text-center">Date In</th>
                                    <th scope="col" class="text-center">Driver Out</th>
                                    <th scope="col" class="text-center">Date Out</th>
                                    <th scope="col" class="text-center">Container Size</th>
                                    <th scope="col" class="text-center">Empty/full</th>
                                    <th scope="col" class="text-center">Import/Export</th>
                                    </tr>
                                </thead>
                                <form action="{% url 'add' %}"method="POST">
                                    {% for form in formset %}
                                        {% csrf_token %}
                                        {{ formset.management_form }}
                                        <tbody class="container-table-body">
                                            <tr>  
                                                {{ form.id }}
                                                {% for field in form %}
                                                    <td>
                                                        {{ field }}
                                                    </td>
                                                {% endfor %}
                                            </tr>
                                        {% endfor %}
                                    </tbody>
                                    <button type="submit" class="btn btn-primary">Add</button>
                                </form>                                
                                <button class="btn btn-primary" id="add-container-btn">Add Container</button>
                            </table>
                        </div>
                    </p>
                </div>
            </div>
            {% endif %}
        </div>
    </div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.4/jquery.min.js" integrity="sha512-pumBsjNRGGqkPzKHndZMaAG+bir374sORyzM3uulLV14lN5LyykqNk8eEeUlUkB3U0M4FApyaHraT65ihJhDpQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

{% endblock %}