1
<div class="admin__field-control">
        <input type="file" name="upload_custom_file" id="upload_custom_file" title="Upload Custom File" class="input-text" >
        <input type="text" name="uuuuu" id="uuuuu">
        <?= $block->getChildHtml('submit_button') ?>
    </div>

Form in order view page.:

enter image description here

After submitting this not getting file response in controller.

Controller:

        print_r($this->getRequest()->getPostValue());
        echo "<br>****<br>";
        print_r($this->getRequest()->getFiles());
        echo "<br>---<br>";
        print_r($this->getRequest()->getPost());
        echo "<br>****<br>";
        print_r($this->getRequest()->getParams());
 
 $yourInputFileName = 'upload_custom_file';
 echo "====".$file = $this->getRequest()->getFiles($yourInputFileName);
 print_r($file);
        die('--------');

Response: enter image description here

enter image description here

1

1 Answer 1

0

please data-form-part="order_form_name" attribute in the input so that i can be part of the specfic form

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.