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>
<...
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' => '...
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:...
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 ...
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 ...
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="...
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..
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',
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"-...
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/...
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 ...
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 ...
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:
$...
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 ...
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 ...
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',
...
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() ?>...
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',
'...
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 '...
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:...
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=...
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 ...
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 ...
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
$...
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' =&...
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 ...
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' => __('...
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',
[
'...
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"&...
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": {
"*": ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
checkbox × 96magento2 × 46
magento-1.9 × 17
checkout × 12
grid × 8
uicomponent × 7
forms × 6
validation × 6
magento-2.1 × 5
ajax × 5
onepage-checkout × 4
terms-and-conditions × 4
product × 3
magento2.3 × 3
magento-1.7 × 3
database × 3
admin × 3
javascript × 3
event-observer × 3
adminhtml × 3
custom-options × 3
layered-navigation × 3
custom-attributes × 3
adminform × 3
customer-attribute × 3