How to open new tab on button click and send post data?
-
14-04-2021 - |
Solution
I just needed to place the target="_blank"
like so
<form id="annex" method="POST" target="_blank" action="checkbutton/index/display">
<input name='monkey' type="hidden" value="<?= $block->getProduct()->getSku(); ?>"/>
<button type="submit" class="action primary tocart" id="checkstores"><?=__('Check Stores')?></button>
</form>
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange