I have a form in the admin section that is dealing with a custom entity. This entity has a main table and then a table to store options on a store level. I am wondering if it is possible to use the same check-boxes on my form as are in the config or product edit page when the scope is changed.
My form extends
Mage_Adminhtml_Block_Widget_Form and I add the fields as follows.
$fieldSet->addField( 'field_code', 'text', array( 'label' => Mage::helper('myhelper')->__('Field Label'), 'class' => '', 'required' => false, 'name' => 'field_code', ) );
I have already added the scope switcher via layout.xml and save the entity values for the scope in a separate table, which all works well.
But it would be great if the user did not have to enter these values if they wanted to use the default scope entry.
NOTE: I have seen some people use
after_element_html before to add the elements but I thought there may be a core function that would do this.