Okay
  Public Ticket #1893035
"New entry", "Edit", and "Delete" modal dialogs aren't popping up for tables in shortcodes
Closed

Comments

  • mgithens started the conversation

    "New entry", "Edit", and "Delete" dialogs aren't popping up for tables that are displayed in a shortcodes inside an admin page.

    How to test:

    1. Create an SQL Query table with server-side processing enabled.

    2. Create an admin page: (here's an example)

    add_action('admin_menu', 'my_admin_menu');

    function my_admin_menu()
    {
        add_menu_page('My Tables', 'My Tables', 'manage_options', 'my-tables/my-tables.php', 'my_tables_admin_page', 'dashicons-screenoptions', 21);
    }

    function my_tables_admin_page()
    {

        ?>
        <div class="wrap">
            <?php echo do_shortcode('[wpdatatable id=1]'); ?>
        </div>
        <?php

    }

    3. Log into the admin and open the newly created admin page

    4. Test any of the "New entry", "Edit", and "Delete" buttons. The modal dialog doesn't render!

    I'm guessing that it has to do with some missing include or something but the browser console isn't showing any issues.

    Let me know if you need any more information.

  •  1,771
    Miloš replied

    Hi mgithens,
    Thank you for your purchase.

    Can you please send me the link of that table so I can take a look.

    Also if I need the login can you please send me the credentials here just click the Private reply so nobody can see it except us.


    Best regards.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •   mgithens replied privately
  •   Miloš replied privately
  • mgithens replied

    This is very disappointing! Could I please return this plugin and get a refund? I was totally under the impression that the wpDataTables plugin could handle CRUD with shortcodes!

  •  472
    Isidora replied

    Hi Micah, 

    Sorry for misunderstanding, actually there is a way that you can use our tables in other back end pages, but not with do_shortcode func.

    You can use function wdtOutputTable which is Helper func that prints out the table in backend. Also you have to include all modals(delete, close and edit modal template)

    <!-- /Modals -->
    <?php wdtOutputTable('1'); ?>
    <!-- Close modal -->
    <?php include WDT_TEMPLATE_PATH . 'admin/common/close_modal.inc.php'; ?>
    <!-- Close modal -->
    <!-- Delete modal -->
    <?php include WDT_TEMPLATE_PATH . 'common/delete_modal.inc.php'; ?>
    <!-- /Delete modal -->
    <!-- Edit modal -->
    <?php include WDT_TEMPLATE_PATH . 'frontend/modal.inc.php'; ?>

    Number 1 is the id of the table so you can replace it with table id that you need.

    Once again sorry for misunderstanding but our plugin is full CRUD application with some specific config in backend pages(templates) like I explain above.

    Best regards

    Kind Regards, 

    Isidora Markovic

    wpDataTables: FAQFacebookTwitterFront-end and back-end demoDocs

    Amelia: FAQFacebookTwitter |  Amelia demo sites | Docs

    You can try our wpDataTables add-ons before purchase on these sandbox sites:

    Powerful FiltersGravity Forms Integration for wpDataTablesFormidable Forms Integration for wpDataTables