editor table select options from a different Sql server

editor table select options from a different Sql server

YoDavishYoDavish Posts: 123Questions: 46Answers: 3
edited July 2019 in Free community support

I've manually added select options within the editor, but how can I build select options from querying a separate SQL server from a different table altogether that can replace the hard coded options below:

editor = new $.fn.dataTable.Editor( {
table: '#table',
ajax: "tableServer-interfaceProjectStatus.php",
fields: [
            {
                label: "Client Name",
                name: "Client Name",
                type:  "select",
                options: [
                    { label: "Empty",   value: "" },
                    { label: "Test 1",  value: "Test 1" },
                    { label: "Test 2",  value: "Test 2" },
                    { label: "Test 3",  value: "Test 3" }
                ]
            }

If someone can point to a guide on how get this started this would be helpful, thanks!

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
    Answer ✓

    Hi @YoDavish ,

    This thread should help, it's asking the same thing. See also here.

    Cheers,

    Colin

This discussion has been closed.