I found this code below at AddressesPost.php for addresses.phtml. How can addresses.phtml send parameter continue or new_address so AddressesPost.php can getParam('continue') or getParam('new_address')?

AddressesPost.php :

if ($this->getRequest()->getParam('continue', false)) {
} elseif ($this->getRequest()->getParam('new_address')) {
} else {

I already add <input type="hidden" name="split" value="0" id="split_flag"/> and <input type="hidden" name="update" value="0" id="update_flag"/> in addresses.phtml and the getParam in controller like in code below.

Controller :

elseif ($this->getRequest()->getParam('new_address')) {
} elseif ($this->getRequest()->getParam('split')) {
    $btn = $this->getRequest()->getPost('btn');
       if($post = $this->getRequest()->getPost('split')){
            $this->_getCheckout()->setSplitItemInformation($post, $btn);
       } else{
} elseif ($this->getRequest()->getParam('update')) {
} else {

It's work for getParam('split'), but it's not work for getParam('update').

  • It is default things, the fields access from controller when form is submitted. Commented Nov 22, 2017 at 10:18
  • So, how can i add new parameter so i could getParam('custom') in the controller? Commented Nov 22, 2017 at 10:22
  • You need to specify that field in your form which is submitted in controller. Commented Nov 22, 2017 at 10:27
  • which field did you mean? Commented Nov 22, 2017 at 10:28
  • In your form, you need to pass field with name "custom" so you get that field value in controller. Commented Nov 22, 2017 at 10:37

1 Answer 1


You can simply add one more field in the form itself. If you look into the template file below, you can see there is a hidden field called continue.


Similar to this hidden field, you can also include your own custom field let say your_custom_field in this form.

<form id="checkout_multishipping_form" data-mage-init='{"multiShipping":{}, "validation":{}}' action="<?= /* @escapeNotVerified */ $block->getPostActionUrl() ?>" method="post" class="multicheckout address form">
    <div class="title">
        <strong><?= /* @escapeNotVerified */ __('Please select a shipping address for applicable items.') ?></strong>
    <input type="hidden" name="continue" value="0" id="can_continue_flag"/>


    <input type="hidden" name="your_custom_field" value="0" id="your_custom_field"/>
  • already tried this, but it's not work. Commented Nov 22, 2017 at 10:36
  • 1
    Can you update your question with your code because just checked with this code $this->getRequest()->getParam('your_custom_field') in controller and it's working..
    – Shyam
    Commented Nov 22, 2017 at 10:45
  • Could you check it again in my update? Commented Nov 23, 2017 at 1:57
  • Now i know the problem, the <input type="hidden" name="your_custom_field" value="0" id="your_custom_field"/> work fine, in my case, it's not work because i add 2 new input, and it's always checked on the first custom input, now i could solve the problem, thank you for the answer!! Commented Nov 23, 2017 at 2:30

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.