use table in template
use table in template
Hi!
I need to use table in a template of existing table. This child table rendering great, but when i'm trying to create new entry I have an error: Uncaught TypeError: Cannot read property 'oFeatures' of undefined.
This is a template for the parent table:
<div id="customForm">
<fieldset class="tableEleves">
<legend>Table des éleves</legend>
<table id="eleve" class="display responsive nowrap table table-bordered " cellspacing="0" width="100%">
<thead>
<tr>
<th></th>
<th>Prenom</th>
<th>Nom</th>
<th>Courriel</th>
</tr>
</thead>
</table>
</fieldset>
<fieldset >
<editor-field name="demandes.ele_id"></editor-field>
<editor-field name="demandes.prog_id"></editor-field>
<editor-field name="demandes.rang"></editor-field>
<editor-field name="demandes.etat"></editor-field>
<editor-field name="demandes.approb"></editor-field>
<editor-field name="demandes.annee"></editor-field>
<editor-field name="files[].id"></editor-field>
</fieldset>
</div>
This is a part of my parent table:
editor =new $.fn.dataTable.Editor({
ajax:{
url:"php/demandes1.php",
type: 'POST',
},
template: '#customForm',
table:"#Programme1",
This is a part of my child table:
var tableEleves;
$(document).ready(function () {
editorEleves=new $.fn.dataTable.Editor({
ajax:"php/eleves.php",
type: 'POST',
table:"#eleve",
The child table "#eleve" working great in separate page, but on a same page whith parent table I can't create or update new item.
If somebody understend what I mean, help me please,
Thanks
This question has an accepted answers - jump to answer
Answers
Are you able to link to a page showing the issue please? I think we would need more information in order to be able to resolve this.
Allan
Yes sure, gap.igyrus.com/connexion.php
Courriel d'utilisateur: [revoked]
Mot de passe: [revoked]
Push please the button "Nouveau" ,
thanks in advance.
Could you remove this line please:
No point in having it as the DataTable won't exist then, and I think it is just confusing things.
More generally, I don't believe that what you are attempting to do will work currently as the lightbox can only show a single form at a time. If you place a second form into edit mode and display it in the lightbox, it will overwrite the first form, with no way to retrieve the first.
The ability to do that is not a feature of Editor at this time and is something that I plan to introduce in future.
Regards,
Allan
So if it`s no ability to do that, I have to change interface for realise this functionality.
Thanks for reponse Allan.
Regards