Site is using ZC 1.5.7c
I'm doing some modifications on the admin orders.php page and have a form written like this
Code:
echo zen_draw_form('split_invoice', FILENAME_ORDERS_INVOICE, '', 'get', 'target="_blank"', true) . "\n";
echo zen_draw_hidden_field('oID', (int)$oID) . "\n";
When a submit button is clicked, I was expecting this to open an invoice in a new tab, but instead it's reloading the orders.php page.
When I inspect element, I see that zen_draw_form is also adding
Code:
<input type="hidden" name="cmd" value="orders">
which explains the reload.
As a quick and dirty test I added
Code:
$_GET['cmd'] = FILENAME_ORDERS_INVOICE;
after my zen_draw_form and it correctly loads the invoice page.
What is the CORRECT way of achieving this?
Bookmarks