Only save some of fields possible ?

Only save some of fields possible ?

SwordmSwordm Posts: 9Questions: 4Answers: 0
edited September 2017 in Free community support

Hello,
I try to use editor.
I took 20 fields with this code with json

$('#example').DataTable( {
        dom: "Bfrtip",
        ajax: "data/objects3.txt", -->( it will be soon php taking data from other database)
        columns: [

Saving it to another mysql database

 editor = new $.fn.dataTable.Editor( {
        ajax: "../php/staffsodsql.php",

But I only want to save 8 of these 20 field

here I only placed first 8 field

Editor::inst( $db, 'sod_report', 'id' )
    ->fields(
    Field::inst( 'id' )
+ 8 lines

data saving to mysql database but I have error;

Requested unknown parameter 'ORDERN' for row 2, column 8. For more information about this error, please see http://datatables.net/tn/4

ORDERN is 9th line which I begin to delete from staff.php

Answers

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

    The Editor PHP instance's field list is used to tell it both want to get and what to set. If you want to get a field from the database, you need to include it there.

    If you want the field not to be editable there is a Field->set() method available - e.g.:

    Field::inst( 'ODRERN' )->set( false )
    

    Full documentation available here.

    Allan

  • SwordmSwordm Posts: 9Questions: 4Answers: 0

    Thank you Allan , my other question is not related with this issue but. If I purchase this editor software can it work at a computer has no internet, only in local intranet ?
    Will it require internet connection for licencing ?

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

    No - Editor does not require an Internet connection - it does not phone home.

    Allan

This discussion has been closed.