I need to add a checkbox to the admin customer edit form. I can successfully add the checkbox using this code:


$name = 'test_foo';
$forms = array('adminhtml_customer');
$baseDir = dirname(__FILE__);

require_once($baseDir . '/app/Mage.php');


$installer = new Mage_Customer_Model_Resource_Setup('core_setup');

        'input' => 'checkbox',
        'type' => 'int',
        'label' => 'Test Foo',
        'visible' => true,
        'global' => 1,
        'default' => '0')

    ->getAttribute('customer', $name)
    ->setData('used_in_forms', $forms)
    ->setData('sort_order', 99)
    ->setData('is_user_defined', 1)
    ->setData('is_required', 0)
    ->setData('is_system', 0)


But then when I edit a customer and click save it says "please wait" forever. If I remove this new attribute then saving a customer works instantly. So how can I add this checkbox without messing up the customer edit functionality?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.