Chosen and Add Row

Chosen and Add Row

andreavelloneandreavellone Posts: 46Questions: 13Answers: 2

I noted that if a use Chosen to for the fieldlist the inline add row don't run.

I add a row inline with in this way
```buttons: [

    {
                extend: "create",
                text:"+",
                editor: editor,
                className: 'btn btn-success waves-effect waves-light m-r-5',
                action: function (e, dt, node, config) {

                    //var id = $("#id").val();
                   // var DebtorId = $('#SearchDebtorInvoice').data('debtorId');

                    editor
                            .create(false)

                            .set('ol.ol')
                            .set('ol.fase')
                            .set('ol.centrale')
                            .set('ol.Data_Inizio')
                            .set('ol.Data_Fine')
                            .set('ol.cliente_id')



                            .submit();

                }  ```

and go well.

If I use Chosen simply don't run.

Somebody knows how to fix it or i must use another fieldlist?

tx a lot

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,464Questions: 1Answers: 10,466 Site admin

    Are you able to give me a link to the page in question so I can try to help debug it please? Are you seeing any Javascript errors in the browser's console?

    Thanks,
    Allan

  • andreavelloneandreavellone Posts: 46Questions: 13Answers: 2

    There is no Javascritpt error. Simply don't go.
    If you click "+" nothing appear. If you click "+" and after click "new" you can see an error in the select made with chosen.

    Here a file with chosen
    http://temisgest.it/tg/files/inline/temis-ol.php

    and here the same file without chosen
    http://temisgest.it/tg/files/inline/temis-ol-copia.php

    tk a lot for your time..

  • allanallan Posts: 63,464Questions: 1Answers: 10,466 Site admin
    Answer ✓

    Hi,

    Thanks for the links!

    It is running - the Ajax request is made and sent to the server, and this is the response from the server:

    {
        "fieldErrors": [{
            "name": "ol.cliente_id",
            "status": "This value is not valid"
        }],
        "data": []
    }
    

    Worth noting that the set() method should take two values if you are using it to set the value of a single field. At the moment it isn't doing very much.

    Allan

This discussion has been closed.