Datatable Doesn Work With Sbmit Button on Responsive Mode

Datatable Doesn Work With Sbmit Button on Responsive Mode

envyusnaticenvyusnatic Posts: 6Questions: 2Answers: 0

Hi i have a table working with dt-responsive, in each column exist and input and final input has a submit button, the problem its this
When table show all content all works fine but when i use responsive mode and show inputs click on + responsive mode, when i click submit button it doesn work pls help me

here is my table

                <form method="post">

                                    <!--================================
                                    TABLA PARA INGRESAR LA ORDEN DE TRABAJO
                                    =================================-->
                                    <table class="table table-bordered table-striped text-center tablaAgregarTransacciones"
                                           width="100%">
                                        <thead>
                                            <tr>
                                                <th style="vertical-align: middle">#</th>
                                                <th style="vertical-align: middle">Yo</th>
                                                <th style="vertical-align: middle">Orden de Trabajo</th>
                                                <th style="vertical-align: middle">Usuario a Evaluar</th>
                                                <th style="vertical-align: middle">Defecto</th>
                                                <th style="vertical-align: middle">Nivel de Calificación</th>
                                                <th style="vertical-align: middle">Observacion</th>
                                                <th style="vertical-align: middle">Acciones</th>
                                            </tr>
                                        </thead>

                                        <tbody>
                                            <tr>

                                                <td style="vertical-align: middle">
                                                    <button type="submit"
                                                            class="btn btn-app bg-primary rounded">
                                                        <i class="fas fa-save"></i>Guardar
                                                    </button>

                                                </td>
                                            </tr>

                                        </tbody>

                                    </table>

                                    <?php

                                        $crearOrdenDeTrabajo = new ControladorOrdenTrabajo();
                                        $crearOrdenDeTrabajo::ctrCrearOrdenTrabajo();

                                    ?>
                                </form>

and here is my javascript pls help me

                                        $('.tablaAgregarTransacciones').DataTable({
                                            "searching": false,
                                            "ordering": false,
                                            "paging": false,
                                            "info": false,
                                            "responsive": true
                                        });

                         ![](https://datatables.net/forums/uploads/editor/qa/r8177as0b5cd.jpg "")

Answers

  • colincolin Posts: 8,150Questions: 0Answers: 1,364

    Is this using Editor for the edits? We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • envyusnaticenvyusnatic Posts: 6Questions: 2Answers: 0
    edited March 24

    http://live.datatables.net/hoxucoke/1/
    http://live.datatables.net/hoxucoke/1/edit

    sorry here is my problem when is responsive button submit doesnt work but when it isnt on responsive it works fine

  • allanallan Posts: 51,467Questions: 1Answers: 7,761 Site admin

    It appears to work okay for me in Firefox - what browser are you using?

    I would point out that what you are doing will only work when there is a single row in the table. Multiple rows will just submit the whole thing.

    Allan

  • allanallan Posts: 51,467Questions: 1Answers: 7,761 Site admin

    Colin pointed out to me that you had an error in the console as well. That was because jQuery was being loaded three times and Responsive was being loaded before DataTables. Fixing them shows no error: http://live.datatables.net/hoxucoke/2/edit .

    Allan

  • envyusnaticenvyusnatic Posts: 6Questions: 2Answers: 0

    Allan it works on desktop view but when submit with responsive library button doesnt work

  • colincolin Posts: 8,150Questions: 0Answers: 1,364

    Can you modify that test case to demonstrate the issue, please.

    Colin

  • envyusnaticenvyusnatic Posts: 6Questions: 2Answers: 0

    i works with php and on desmostrate page i think still doesnt work at all to show mi error mmm another way maybe???

  • colincolin Posts: 8,150Questions: 0Answers: 1,364

    Allan it works on desktop view but when submit with responsive library button doesnt work

    When you say "submit", are you using Editor?

    If it works on desktop, then it's going to be something in the styling, so the back-end won't matter. If you can't modify the example, you'll need to link to your page for us to see it,

    Colin

Sign In or Register to comment.