PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, November 10, 2022

[FIXED] How to change url of back button in grid form in admin of magento?

 November 10, 2022     adminhtml, magento, magento-1.7     No comments   

Issue

I am working Magento community edition 1.7 version.

I have a grid in admin panel. Now when I click on this URL it open a form with two tabs in left sidebar. When I click on second tab it show a grid in its right side.

Then I click on a row of this grid it opens a form on another page. In this form there is back button.

How can I change its URL to previous page?


Solution

Add your custom back button and remove default one in your Form Container class constructor.

$data = array(
        'label' =>  'Back',
        'onclick'   => 'setLocation(\'' . $this->getUrl('*/*/*') . '\')',
        'class'     =>  'back'
   );
$this->addButton ('my_back', $data, 0, 100,  'header'); 
...
parent::__construct();
...
$this->_removeButton('back');


Answered By - Deependra Singh
Answer Checked By - Katrina (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing