7 votes
Accepted

how to call the observer after checkout and store the orderid in my custom collection?

Using observer event "sales_order_place_after" you can save data in your custom table. In your module's app/code/local/Namespace/Module/etc/config.xml add code like <events> <...
user avatar
7 votes

before submit a form atleast one checkboxes is required

Replace your code with this code $fieldset->addField('checkboxes', 'checkboxes', array( 'label' => Mage::helper('listings')->__('Select Categories'), 'name' => '...
user avatar
  • 5,813
4 votes
Accepted

Admin grid massaction checkboxes default checked & option set to action I want

You can have a selected mass action by default by defining it in your grid block like this: $this->getMassactionBlock()->addItem('mass_action_code_here', array( 'label' => Mage:...
user avatar
  • 195k
4 votes
Accepted

Adding Checkbox in system configuration is not working

Not sure about this but your input name is wrong. It should be in this format groups[general][fields][terms][value]. That structure is needed in order to read the values properly and store them in the ...
user avatar
  • 195k
3 votes
Accepted

Magento 2.0 Checkbox required validation not triggering

You have to do below code, use class name as checkbox required to validate checkbox, <div class="field"> <label class="label" for="custom_second"> <span><?php echo ...
user avatar
3 votes

Set the checkbox value to checked by default for super product attribute configuration

I've found my solution in /js/mage/adminhtml/product.js after var label_readonly = ''; var use_default_checked = ''; if (attribute.use_default == '1') { use_default_checked = ' checked="...
user avatar
3 votes

before submit a form atleast one checkboxes is required

To Select atleast one checkbox try below code <input type="checkbox" value="14" class="validate-one-required" name="cat_ids[]" id="checkboxes_id" /> it worked for me..
user avatar
3 votes

before submit a form atleast one checkboxes is required

Try adding the class attribute like this: 'class' => 'category_match_to_listing validate-one-required-by-name',
user avatar
  • 195k
3 votes

How to add a checkbox in Account Edit Page to change custom information

Best way is just to check how Magento does this. By looking at vendor/magento/module-customer/view/frontend/templates/form/edit.phtml you'll see that the checkboxes have a data-role="change-email"-...
user avatar
  • 11.6k
3 votes
Accepted

Magento 2 : Is there a way to customize the labels of an admin form toggle?

The labels cannot be changed within the uiComponent options but if you want to override the core functionality , you will have to override It can be done, check edit. vendor/magento/module-ui/view/...
user avatar
  • 4,585
3 votes

Magento 2 Add multiple checkbox in admin ui form Group component

Paste this Code in your ui-component <fieldset name="custom_checkbox"class="Vendor\Module\Ui\Component\Form\CustomCheckbox"> <argument name="data" xsi:type="array"> <item ...
user avatar
  • 871
2 votes
Accepted

Disable massaction checkbox checked on grid row click

Thanks to previous answer, I've finally find a solution - by adding this method getRowClickCallback to my grid class (that overrides a core grid Mage_Adminhtml_Block_Catalog_Product_Grid), that ...
user avatar
2 votes

Disable massaction checkbox checked on grid row click

With openGridRow you were already close to the solution. This is the default JS callback, but you can change it with the row_click_callback property of the grid widget. For no action at all, use: $...
user avatar
2 votes

checkboxes values not saving more then one

You need to specify that the checkboxes allow multiple values. You can do that by adding a name attribute like this: 'warranty_services' => array( 'label' => $this->__('Warranty ...
user avatar
  • 195k
2 votes

before submit a form atleast one checkboxes is required

I suspect your issue is with $cat_ids. What happens when you var_dump($cat_ids) when getting your error? Does it return null or a string, rather than an array? I'd suspect you're passing a non-array ...
user avatar
  • 1,191
2 votes
Accepted

Varien_Data_Form - 'checkboxes' only save last value

you need to make the name of the input an array. So instead of $fieldset->addField( 'checks', 'checkboxes', array( 'name' => 'checks', ...
user avatar
  • 195k
2 votes
Accepted

How to change anchor links to checkbox in list page?

If you JUST want to replace anchor with checkbox, it's very easy, replace : <a href="<?php echo $this->urlEscape($_item->getUrl()) ?>"> <?php echo $_item->getLabel() ?>...
user avatar
  • 4,626
2 votes

Magento 1.9.2 - how to set checkbox in admin grid checked by default

Try This $this->addColumn('skip', array( 'header' => Mage::helper('importexport')->__('Skip'), 'type' => 'checkbox', 'name' => 'skip', '...
user avatar
  • 2,183
2 votes
Accepted

Magento 2 : By Default Checked Checkbox in Admin Form

Instead of using 'checked' => true , i use 'checked' => array(value1,value2,...) , in conlcusion if you wanna set checkboxes checked use the value from each checkbox insert it to array and put in in '...
user avatar
2 votes

Remove checkbox label

You need to Remove lable item from your code Remove below Line : <item name="label" xsi:type="string">Checkbox Field</item> Below is Complete code : <item name="checkbox_field" xsi:...
user avatar
  • 9,570
2 votes
Accepted

Magento 2 Show checkbox checked in grid edit mode depending upon value?

To achieve this functionality I had changed my html: <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> <div class="checkbox checkbox-primary checkbox-inline"> <input id=...
user avatar
  • 2,008
2 votes
Accepted

magento2 admin grid edit form checkbox not checked

You need to add one parameter 'checked' => true, in your code like below, $fieldset->addField( 'applies_to_addons', 'checkbox', [ 'label' => __('Applies ...
user avatar
  • 1,557
2 votes
Accepted

Magento 1 : Change multiselect product attribute to mutliple checkbox attribute

After long research, I did some workarounds on this and yes it did the job. Here are my findings Magento 1.9 doesn't allow to create a multiple checkbox attribute from the backend. It has some ...
user avatar
  • 147
1 vote

How Can I Bulk Unchecked Categories Check Box for Selected Products

use getCategoryIds and setCategoryIds property of product model $product = Mage::getModel('catalog/product')->load($id); $cat=$product->getCategoryIds(); //remove category id from $cat array $...
user avatar
  • 3,099
1 vote
Accepted

I have created module but checkbox not working properly in magento?

Use below code //$selected = array('read', 'games'); $selected = 'get value here from database format as above'; $fieldset->addField('hobbies', 'checkboxes', array( 'label' =&...
user avatar
1 vote
Accepted

Magento 2.1 : Grid duplicate checkbox id_ issue on add new and edit form

I solved this issue , if someone encounters a similar situation - you can resolve the conflict by adding 'use_index' => true in your _prepareColumns() method. This allows you to choose your custom ...
user avatar
  • 1,702
1 vote

Magento 2 : By Default Checked Checkbox in Admin Form

Pass one more value as checked => true. $fieldset->addField( 'service'.$i, 'checkboxes', [ 'name' => _('service'.$i.'[]'), 'label' => __('...
user avatar
1 vote

Magento 2 : By Default Checked Checkbox in Admin Form

You need to add one parameter 'checked' => true, in your code like this, $fieldset->addField( 'service'.$i, 'checkboxes', [ '...
user avatar
1 vote

Remove checkbox label

Use this "description" instead of "label" "label": <item name="label">I accept the Terms of Use and Privacy Policy</item> "description": <item name="description" xsi:type="string"&...
user avatar
  • 1,168
1 vote
Accepted

Magento2 how to set checkbox value?

For passing value you need to overwrite 'Magento_Checkout/js/model/shipping-save-processor/default.js' Create Vendor/Module/view/frontend/requirejs-config.js var config = { "map": { "*": ...
user avatar
  • 34.1k

Only top scored, non community-wiki answers of a minimum length are eligible