Este es mi proyecto actual usando la biblioteca Javascript, BalkanApp
El botón Agregar es de la biblioteca.
Esta es la codificación de la plantilla.
template: "ula", nodeBinding: { field_0: "name", field_1: "title", img_0: "img" }, nodeMenu: { details: { text: "Details" }, edit: { text: "Edit" }, add: { text: "Add" }, remove: { text: "Remove" } } });Estos son los detalles que necesito INSERTAR en MYSQL
nodes = [ { id: 3, pid: 1, tags: ["blue"], ppid: 2, name: "Queen Elizabeth II", img: "https://cdn.balkan.app/shared/f5.png"}, { id: 4, pid: 3, tags: ["left-partner"], name: "Prince Philip", title: "Duke of Edinburgh", img: "https://cdn.balkan.app/shared/f3.png"} ];Y esto es lo que he hecho por ahora.
chart.on('add', function (sender, node) { <?php $sql = "INSERT INTO individual (id, pid, ppid, tags, name, title, img) VALUES ('node.id', 'node.pid', 'node.ppid', 'node.tags', 'node.name', 'node.title', 'node.img')"; if ($mysqli->query($sql) === TRUE) { echo "New record created successfully"; } else { echo "Error: " . $sql . "<br>" . $conn->error; } $conn->close(); ?> });Encontré la explicación de la biblioteca aquí pero aún no puedo encontrar la solución https://balkan.app/OrgChartJS/Docs/Menus https://balkan.app/OrgChartJS/Docs/APIReference#addEvent