• Resolved mathewstudent

    (@mathewstudent)


    Hello,

    I am using your great plugin for some time but there is one part which I fail to find.

    While for Form Builder -> Project you can just set “Allow Bulk Actions” to “yes” and this way you get set of nice Bulk Action once you display form on your page – I would like to do that same for Table Builder ->Data Table, so once I display such table with the short code on my page, I also get this nice Bulk Action menu.

    Is that possible to be done somehow and I just missed it or is it not possible (at least not yet)?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Leeberty

    (@aaronvincentlee)

    Hi @mathewstudent ,

    I understand that you want to include the “Allow Bulk Actions” option for your tables.

    It looks like you want to display the bulk actions together with the table in the front end.

    Currently, for data forms, the bulk actions are only visible in the admin side of your site. See here: https://share.getcloudapp.com/v1uWx68r

    This means that the bulk actions for data tables won’t be available for frontend display as well.

    I hope this information finds you well.

    Let me know of further questions.

    Plugin Contributor Kim L

    (@kimmyx)

    Hi @mathewstudent,

    Are you using the [wpdadiehard] shortcode or the [wpdadataproject] one?

    For clarification, bulk actions will appear for tables in a project but on a page level only using the [wpdadiehard] shortcode.

    See here: https://share.getcloudapp.com/X6u7dJZ1

    Hope that helps. ??

    Thread Starter mathewstudent

    (@mathewstudent)

    Thanks, I see what is the limitation and what can be done.

    Just in case anyone would need I am leaving some simple JS code to export full Data Table from front-end:

    <button onclick="exportToExcel('your_html_element_id', 'desired_export_file_name_and_sheet_name')">Export to Excel</button>
    
    
    <script src="https://unpkg.com/xlsx/dist/xlsx.full.min.js"></script>
    
    function exportToExcel(tableElementId,fileName) {
            // Get table element
            var table = document.getElementById(tableElementId);
    
            // Create a new workbook
            var wb = XLSX.utils.book_new();
    
            // Convert table to worksheet
            var ws = XLSX.utils.table_to_sheet(table);
    
            //Add all records skipping one header
            XLSX.utils.sheet_add_aoa(ws, XLSX.utils.sheet_to_json(ws, { header: 1 }).slice(1));
    
    
            // Add the worksheet to the workbook
            XLSX.utils.book_append_sheet(wb, ws, fileName);
    
            // Generate the Excel file and download it
            XLSX.writeFile(wb, fileName + ".xlsx");
        }
    Leeberty

    (@aaronvincentlee)

    Hi @mathewstudent ,

    Thanks for sharing your workaround. ??

    Let us know if you have further questions. We’d be glad to help you out.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Bulk Action for table on page’ is closed to new replies.