TransWikia.com

Magento 2 | Launch an action form in the order view of the backend

Magento Asked on February 3, 2021

I am trying to launch an action form for uploading some attachments and staying on the same page in the order view section of the Magento backend.
My code for now is this but it doesn’t work, the form is launched but there is no response from $ _POST

<?php
if (!empty($_POST)){
    
    echo 'form submitted!';

}
?>

<form id="doc-form" name="doc-form" action="https://www.mysite.it/adminhg/sales/order/view/order_id/422/key/df180822a9b74c12d8c8215ea953b092c9b832bc9e166eba7104bf5464b37b6f/">
<input id="orderID" name="orderID" value="<?php echo '422'; ?>" style="display:none;"/>

<table class="data-table orders" id="my-orders-table">
                <colgroup>
                    <col width="1">
                    <col width="1">
                    <col>
                    <col width="1">
                    <col width="1">
                    <col width="1">
                </colgroup>
                    <thead>
                        <tr class="first last">
                            <th>Select file</th>
                            <th>Product</th>
                            <th>Comment</th>
                            <th></th>
                        </tr>
                    </thead>
                    
                    <tbody>
                        <tr class="first last odd">
                            <td><input type="file" title="File" name="docname" /></td>
                            <td><input type="text" title="image_title" name="image_title"></td>
                            <td><input type="textarea" title="image_comments" name="image_comments"></td>
                            <td><input type="submit" form="doc-form" value="Upload file" name="allBozza" /></td>
                        </tr>
                    </tbody>
            </table>
                                       
</form>

Thanks for any help

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP