Hello. please, i need help to solve this problem. I inserted in a column of a datatable a richselect as you can see from the code that I posted below. I want to relate each cell of the “field name” column to the “associate tag” column, where the richselect is located, in order to save the values of the two IDs in a database table in the related fields: id_tag and id_field.
Thank you so much
var field = {
id:"tabField",
view:"datatable",
select:"row",
navigation:true,
editable:true,
scroll:"xy",
autoConfig:true,
columns:[
{id:"id", header:"#", width:50},
{id:"id_progetto", editor:"text", header:"progetto", sort:"string", fillspace: 1},
{id:"id_field", editor:"text", header:"id Campo", sort:"string", fillspace: 1},
{id:"nome_field", editor:"text", header:"Nome Campo", sort:"string", fillspace: 1},
{id:"id_tag", editor:"richselect", header:"Associa TAG", vertical: true, options:"data/data_tag.php?idprogetto=[here parameter of id_progetto]", fillspace: 1},
{id:"edit", header:" ", width:35, template:"<span style=' cursor:pointer;' class='webix_icon fa-pencil'></span>"},
{id:"delete", header:" ", width:35, template:"<span style='cursor:pointer;' class='webix_icon fa-trash-o'></span>"}
],
save: "connector->data/data_save_field_tag.php",
url: "data/data_field_tag.php",
VALUE FROM data/data_tag.php INSERT IN richselect
[{"id_tag":"15","value":"descrizione"},{"id_tag":"16","value":"foto"},{"id_tag":"17","value":"potenza"},{"id_tag":"18","value":"Root"},{"id_tag":"19","value":"titolo"},{"id_tag":"20","value":"valore1"},{"id_tag":"21","value":"valore2"},{"id_tag":"22","value":"valore3"},{"id_tag":"23","value":"valore4"},{"id_tag":"24","value":"valore5"},{"id_tag":"25","value":"valore6"},{"id_tag":"26","value":"valore7"},{"id_tag":"27","value":"valore8"},{"id_tag":"28","value":"descrizione"},{"id_tag":"29","value":"foto"},{"id_tag":"30","value":"potenza"},{"id_tag":"31","value":"Root"},{"id_tag":"32","value":"titolo"},{"id_tag":"33","value":"valore1"},{"id_tag":"34","value":"valore2"},{"id_tag":"35","value":"valore3"},{"id_tag":"36","value":"valore4"},{"id_tag":"37","value":"valore5"},{"id_tag":"38","value":"valore6"},{"id_tag":"39","value":"valore7"},{"id_tag":"40","value":"valore8"}]
VALUE FROM data/data_field_tag.php INSERT IN datatable
[{"id":"1","id_progetto":"1","id_tag":"","nome_field":"id","id_field":"1"},{"id":"2","id_progetto":"1","id_tag":"","nome_field":"id_prodotto","id_field":"2"},{"id":"3","id_progetto":"1","id_tag":"","nome_field":"Nome","id_field":"3"},{"id":"4","id_progetto":"1","id_tag":"","nome_field":"id_tabella","id_field":"4"},{"id":"5","id_progetto":"1","id_tag":"","nome_field":"Specifica_1","id_field":"5"},{"id":"6","id_progetto":"1","id_tag":"","nome_field":"IP","id_field":"6"},{"id":"7","id_progetto":"1","id_tag":"","nome_field":"Classe","id_field":"7"},{"id":"8","id_progetto":"1","id_tag":"","nome_field":"Montaggio","id_field":"8"},{"id":"9","id_progetto":"1","id_tag":"","nome_field":"Cavo","id_field":"9"},{"id":"10","id_progetto":"1","id_tag":"","nome_field":"Collegamento","id_field":"10"},{"id":"11","id_progetto":"1","id_tag":"","nome_field":"Carrabile","id_field":"11"},{"id":"12","id_progetto":"1","id_tag":"","nome_field":"Peso","id_field":"12"},
CREATE TABLE `rel_tag_field` (
`id` int(16) NOT NULL,
`id_progetto` int(16) NOT NULL DEFAULT '1',
`id_tag` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`id_field` int(16) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;