mikkka
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Thank you!
Hi, no It’s on my wampserver now.
So you have such a demo search form: https://wpdataaccess.com/publication-search-form-demo/
Does it work with multiple queries, f. ex. : “Clara, Sara, Mike” for the “First Name” input box? If no what could be a solution?
Hello,
the old table builder.I tried 2 approaches:
- By search several order numbers at once
- By creating 3 search fields for each order number
<form action="./orders" method="get">Split the input by commas to get individual order IDs
<input id="wpda_search_column_order_id" name="wpda_search_column_order_id" type="text" />
<input class="button" type="submit" /> <input class="button" type="reset" /></form>
PHP snippet for child theme funcion.php:
add_action('init', 'handle_custom_search');
function handle_custom_search() {
if (isset($_GET['wpda_search_column_order_id'])) {
$order_ids = $_GET['wpda_search_column_order_id'];
// Split the input by commas to get individual order IDs
$order_ids = explode(',', $order_ids);
// Process each order ID
foreach ($order_ids as $order_id) {
// Trim any extra spaces and process the order ID
$order_id = trim($order_id);
if (!empty($order_id)) {
// Example: Log the order ID or perform a search
error_log("Searching for order ID: $order_id");
}
}
}
}
Viewing 3 replies - 1 through 3 (of 3 total)