Hey there, Awesome Customers!

Just a heads up: We'll be taking a breather to celebrate International Workers' Day (May 1st and 2nd - Wednesday and Thursday) and Orthodox Easter from Good Friday (May 3rd) through Easter Monday (May 6th). So, from May 1st to May 6th, our team will be off enjoying some well-deserved downtime.

During this time, our customer support will be running on a smaller crew, but don't worry! We'll still be around to help with any urgent matters, though it might take us a bit longer than usual to get back to you.

We'll be back in action at full throttle on May 7th (Tuesday), ready to tackle your questions and requests with gusto!

In the meantime, you can explore our documentation for Amelia and wpDataTables. You'll find loads of helpful resources, including articles and handy video tutorials on YouTube (Amelia's YouTube Channel and wpDataTables' YouTube Channel). These gems might just have the answers you're looking for while we're kicking back.

Thanks a bunch for your understanding and support!

Catch you on the flip side!

Warm regards,

TMS

Okay
  Public Ticket #2467717
Customize the popup page to show my request response
Closed

Comments

  • Pulego Tech started the conversation

    Good Day

    I need your help to advice if it will be possible to customize the popup since i need to add a javascript code that i have to make a request based on the id so i can get more data and display on the popup?

    Or maybe to add a shortcode to pull the info i need..

    if possible i need the location of the  popup page that i can work on to customize the popup and how it looks at the moment.


    Thanks

  •  2,498
    Aleksandar replied

    Hello Pulego Tech

    The data is being sent with the POST method, so you can use WordPress' hook the_content, where the data can be taken be taken from the POST and forwarded to do_shortcode function. There, our shortcode can be placed with the placeholder %VAR1% like in the following example. Of course, you first need to create an SQL Query based table, where you'll filter the desired column with %VAR1%. Here's the example:

    function test($content){
     if (isset($_POST['wdt_details_data'])){
     $detailsData= json_decode(stripslashes($_POST['wdt_details_data']), true);
     } $content .= do_shortcode('[wpdatatable id=1 var1=' . $detailsData['columnName'] . ']');
    return $content;
    }
    add_filter( 'the_content', 'test');

    The data of an entire row you clicked on are located in $_POST['wdt_details_data']. The format is that of an array of the pairs the row contains (columnName=value), where 1 is the ID of the table on the Master page, and it needs to replace the columnName with orig header of the column you wish to filter.

    This will be added to every page, so you need to add another condition above everything for the posts you need. 

    Kind Regards, 

    Aleksandar Vuković
    [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