Create new entry pop-up empty

Create new entry pop-up empty

cranworthcranworth Posts: 20Questions: 10Answers: 0

When I hit the new button in editor to create a new entry, the text for each field is empty. See image here: http://postimg.org/image/68ijfx78r/

This is the initiazation of my datatable:

var data_table = $('#directory_entries').DataTable({
            data: data, 
            dom: "Tfrtip",
            columns: [ 
              { data: null, defaultContent: '', orderable: false },
              {data: 'title'}, 
              {data: 'created'}, 
              {data: 'authors'}, 
              {data: 'document'}, 
              {data: 'tags'}
            ],
            order: [ 1, 'asc' ],
            tableTools: {
                sRowSelect: "os",
                sRowSelector: 'td:first-child',
                sSwfPath: '../datatable/DataTables-1.10.0/extensions/TableTools/swf/copy_csv_xls_pdf.swf',
                aButtons: [
                    { sExtends: "editor_create", editor: editor },
                    { sExtends: "editor_edit",   editor: editor },
                    { sExtends: "editor_remove", editor: editor }
                ]
            }


          });

and here is the editor:

 editor = new $.fn.dataTable.Editor( {
          ajax: "../api/handlers/directory2_handler.php",
          table: "#directory_entries",
          fields: [ {
                  name: "title"
              }, {
                  name: "created"
              }, {
                  name: "authors"
              }, {
                  name: "document"
              }, {
                  name: "tags"
              }
          ]
        } );

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin
    Answer ✓

    You need to use fields.label to give the fields a label. The default is an empty string.

    Regards,
    Allan

This discussion has been closed.