Hidden Columns Still Showing

Hidden Columns Still Showing

dellaboemiadellaboemia Posts: 5Questions: 1Answers: 0

I'm not clear on precisely how to hide a column. I've implemented two tables on the same page. For the first table, I simply assigned the field's type attribute a "hidden" property. I did this in the table.tablename.js file. It worked. However, it's not working for the 2nd table. Please advise.

Here's the code
'''
(function($){

$(document).ready(function() {
var editor = new $.fn.dataTable.Editor( {
"ajax": "http://localhost/smartify/public/main/script/php/table.certificates.php",
"table": "#certificates",
"fields": [
{
"label": "user_id",
"name": "user_id",
"type": "hidden"
},
{
"label": "Provider",
"name": "provider",
"type": "select",
"options": [
"Cambridge University Press ",
"\tCanvas.net ",
"\tClass2Go ",
"\tCommonwealth of Learning ",
"\tComplexity Explorer ",
"\tCoursera ",
"\tCourseSites ",
"\tDesire2Learn ",
"\t\u00c9cole Fran\u00e7aise de Comptabilit\u00e9 ",
"\tEdCast ",
"\tEdraak ",
"\tedX ",
"\tEMMA ",
"\tFirst Business MOOC ",
"\tForum Academy ",
"\tFrance Universit\u00e9 Numerique ",
"\tFutureLearn ",
"\tgacco ",
"\tGeorgia Tech Online Master of Science in Computer Science ",
"\tIndependent ",
"\tIONIS ",
"\tiversity ",
"\tJanux ",
"\tKadenze ",
"\tMir\u00edada X ",
"\tMongoDB University ",
"\tmooc.house ",
"\tMOOC-ED ",
"\tMRUniversity ",
"\tNovoED ",
"\tNPTEL ",
"\tOpen2Study ",
"\tOpenBUCS ",
"\tOpenClassrooms ",
"\tOpenCourseWorld ",
"\topenHPI ",
"\tOpenLearning ",
"\topenSAP ",
"\tPolimi OPEN KNOWLEDGE ",
"\tPsyAsia International ",
"\tRwaq (????) ",
"\tStanford OpenEdx ",
"\tTelescopio ",
"\tUdacity ",
"\tUdemy ",
"\tUniversiteplus ",
"\tUPV [X] ",
"\tUWA Class2GO"
]
},
{
"label": "Institution",
"name": "institution"
},
{
"label": "Course",
"name": "course"
},
{
"label": "Certificate",
"name": "certificate"
},
{
"label": "Date",
"name": "date_earned",
"type": "date",
"dateFormat": "mm\/dd\/y"
}
]
} );

$('#certificates').DataTable( {
    "dom": "Tfrtip",
    "ajax": "http://localhost/smartify/public/main/script/php/table.certificates.php",
    "columns": [
        {
            "data": "user_id"
        },
        {
            "data": "provider"
        },
        {
            "data": "institution"
        },
        {
            "data": "course"
        },
        {
            "data": "certificate"
        },
        {
            "data": "date_earned"
        }
    ],
    "tableTools": {
        "sRowSelect": "os",
        "aButtons": [
            { "sExtends": "editor_create", "editor": editor },
            { "sExtends": "editor_edit",   "editor": editor },
            { "sExtends": "editor_remove", "editor": editor }
        ]
    }
} );

} );

}(jQuery));
'''

This discussion has been closed.