I see. You could be creating the custom Editor form early in the code so its displayed while your dependancies (.js and .css files) are being loaded. Place that code last in the -body section. This way the time between the form being created and the Editor being initialized as short.
@kthorngren I dont have body.. I tried placing after </table>... also tried after</thead> but still same issue. Here is original code where I define customForm.
You do on lines 121-146 but most of your HTML is not in the body.
There is some delay on the page causing the display of the form. You can debug your page if you wish. Maybe an easier option is to use display: none on the form, for example:
@Shivani Vyas I see you're using Editor in your example, but our accounts aren't showing that you have a license. Is the license registered to another email address? Please can let us know so we can update our records and provide support.
Hi @colin Thank you so much. Also if I add "display: none" the editor displays nothing.. and I dont even have more than one editor .. I found some similar issue in which they used multiple editor on same page. But its not same in my case.
@kthorngren Thank you Kevin. Now editor is gone.. but still it shows all headers first for few seconds.. is it normal ? I checked other pages on website and few of them have same result... first it display all headers /column names and load table after that. and few pages load directly table.
but still it shows all headers first for few seconds..
Do you want the table to be hidden? Not sure I understand the issue. You can hide the =tag tablethen show it later in-option initComplete` if you don't want it displayed until the table loads.
@kthorngren all issues resolved. Thank you so much Kevin and Colin for your help. I learned so many new things about Datatables with your help ad support.
Replies
Looks like your page initially displays some that gets hidden. I put a breakpoint before the Editor initializes and you can see what is loaded:
That is a process that happens before Editor and Datatables are initialized. Not sue what it is but maybe you can hide the element with
display: none
.Kevin
@kthorngren sorry I didn't get it.. which element to hide? where to define display: none. ?
I used customForm to display editor .. using template as below document.
https://editor.datatables.net/examples/simple/template.html
So I think before table loads it display this customform
I see. You could be creating the custom Editor form early in the code so its displayed while your dependancies (.js and .css files) are being loaded. Place that code last in the
-body
section. This way the time between the form being created and the Editor being initialized as short.Kevin
@kthorngren I dont have body.. I tried placing after </table>... also tried after</thead> but still same issue. Here is original code where I define customForm.
You do on lines 121-146 but most of your HTML is not in the
body
.There is some delay on the page causing the display of the form. You can debug your page if you wish. Maybe an easier option is to use
display: none
on the form, for example:Kevin
@kthorngren that body tag is from different file which I added in the ele1.php page using require(filepath).
I also tried adding display: none but still same result. No change.
@Shivani Vyas I see you're using Editor in your example, but our accounts aren't showing that you have a license. Is the license registered to another email address? Please can let us know so we can update our records and provide support.
Thanks,
Colin
Hi @colin I sent you a message please check.
Hi @Shivani Vyas , thanks for letting us know, I've updated our records.
Colin
Hi @colin Thank you so much. Also if I add "display: none" the editor displays nothing.. and I dont even have more than one editor .. I found some similar issue in which they used multiple editor on same page. But its not same in my case.
Here is the page that has issue..
https://test.assettrack.cx/elevators/ele1.php
You have this custom form. Try adding a
div
to wrap the customFormdiv
and usedisplay: none
, like this:Kevin
@kthorngren Thank you Kevin. Now editor is gone.. but still it shows all headers first for few seconds.. is it normal ? I checked other pages on website and few of them have same result... first it display all headers /column names and load table after that. and few pages load directly table.
Are you talking about the "Asset", "Levels", etc shown in the screenshot I posted above?
If so that is for the custom form for the Editor. You can remove the
div
that has this if you don't need it.Kevin
@kthorngren No I am taking about table columns.. <tr><th>...</th></tr>
Do you want the table to be hidden? Not sure I understand the issue. You can hide the =tag table
then show it later in
-option initComplete` if you don't want it displayed until the table loads.Kevin
@kthorngren all issues resolved. Thank you so much Kevin and Colin for your help. I learned so many new things about Datatables with your help ad support.