Holiday Notice – Support Unavailable on April 18 and April 21

We just wanted to let you know that our support team will be offline on Friday, April 18th (Good Friday) and Monday, April 21st (Easter Monday) due to the holidays.
We'll be back on Tuesday, ready to assist you!

In the meantime, if you need any help, feel free to:

Amelia YouTube Channel

wpDataTables YouTube Channel

Thank you for your understanding, and we wish you a wonderful holiday weekend!

Okay
  Public Ticket #2878182
placeholders
Closed

Comments

  •  2
    Barry Horsley started the conversation

    Is it possible to pass a placeholder through a URL parameter?

    I cannot find it in the documentation.

    https://wpdatatables.com/faqmd/use-url-parameters-filtering/

  • [deleted] replied

    Hi Barry

    Thank you for reaching out to us.

    Supposedly, your URL is https://yourwebsite.com/?value_x=123

    The data pulled from the database creates a table using a query similar to this:

    SELECT * FROM table WHERE value_x = %VAR1%

    After that, you can use a hook for dynamic placeholders (place it in functions.php of your theme, or your child theme):

    function updateVAR1($tableID){  global $wdtVar1;      //check is set GET parametar value_x    if(isset($_GET['value_x'])){        //get value from form field        $wdtVar1 = $_GET['value_x'];    }  }
    add_action('wpdatatables_before_get_table_metadata', 'updateVAR1');

    I hope this helps.