2

I would like to make more then one checkbox for grid in custom form. and grid checkbox value should be passed through form.I have implement it in form grid but it has problem when i click on first checkbox it also trigger for second column checkbox.Check this

My code for this is as below

Layout file.

<warranty_mail_data>
    <block type="core/text_list" name="root" output="toHtml">
        <block type="warranty/adminhtml_warranty_edit_tab_formcustomer" name="warranty.edit.tab.formcustomer" />
        <block type="adminhtml/widget_grid_serializer" name="customer_grid_serializer" >
                <action method="initSerializerBlock">
                    <grid_block_name>shippinggroup.edit.tab.formcustomer</grid_block_name>
                    <data_callback>_getSelectedCustomers</data_callback>
                    <hidden_input_name>links[customer_ids]</hidden_input_name>
                    <reload_param_name>customer</reload_param_name>
                </action>
                <action method="addColumnInputName">
                   <input_name>shouldsentmail</input_name>
               </action>

        </block>
    </block>
</warranty_mail_data>

Form Grid file

$this->addColumn('customer_ids', array(
        'header_css_class'  => 'a-center',
        'type'              => 'checkbox',
        'name'              => 'customer_ids',
        'values'            => $this->_getSelectedCustomers(),
        'align'             => 'center',
        'index'             => 'entity_id'
    ));
   $this->addColumn('shouldsentmail', array(
        'name'              => 'shouldsentmail',
        'type'              => 'checkbox',
        'index'             => 'shouldsentmail',
        'values'            => '',

    ));

Please help me on this.

Edited Debug

Debug Here you can see both have same onclick event object due to this when it post field it has long string and when try to parse it using magento it gives me long array with contain some script in array element.

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.