Angular Checkbox Checked Event

A step by step tutorial on handling multiple checkboxes in Angular 8|9, we will learn how to create, select and unselect multiple checkboxes and validate checkboxes with Angular Reactive Forms. The following example demonstrates how to implement a custom single-check directive. In this article we create different pages by using Angular Material Progress Bar, Spinner, Check Box, Card, Select and Expansion Panel Components. If you want to compare the implementation please check those as well. Kindly let me how I can enable/disable a textbox on checkbox click in mvc. But I've decided to make three-state checkbox. You have to put 2 things inside your html: (Checked)="some logic" (Click)="method()" this method in your ts file should open a confirmation pop-up or whatever you want it to do before it manipulates the logic that makes the checkbox checked or not. preventDefault() is called on the submit event. This sample illustrates how you can easily create tree nodes with checkboxes by simply setting the child item of the checkboxes to true. 1 Comment. Css Styling. When the checkbox role is added to an element, the user agent should do the following: Expose the element as having a checkbox role in the operating system's accessibility API. We'll cover how it works and a simple use case. Let's look at an example of how we can use the ng-model with the "textbox" and "checkbox" input type. Track tasks and feature requests. The ng-model directive can also be applied to the input elements such as the text box, checkboxes, radio buttons, etc. I can not get the checkboxes to maintain state after pagination. Custom Single-Check Directive. Added a click event when selecting the bootstrap angular-ui date. As it is checked, some options appear. We will show or hide a textbox control on checked/unchecked of a checkbox in our SharePoint Online form which we have created using HTML, CSS and put the code inside a script editor web part. And i had taken Enable callbacks in My Gridview as true. In this post, we won’t cover the CSS file for this component as it is not Angular specific, but you can dig into the source code in the included working code example below. Catch checked change event of a checkbox. As a result, if you want to hook into the submit event and do something conditionally based on whether or not the form was valid, you can check if the event. receive the event and check if checkbox is checked before adding property. The default value is false. ngClick is used in Angular 1. Join the community of millions of developers who build compelling user interfaces with Angular. This page will walk through Angular Material checkbox example. It's very easy to implement and has lots of features. Checkbox 多选框. so you can check also there. A cross browser compatible JavaScript function to select or de-select all checkboxes in a form. I have explained the same using Angular js 1 and Jquery. Back in 2014 I gave a talk at ngEurope that covered the basics of Angular accessibility. Content of the element acts as label for checkbox in angular material. In this post we will show you angularjs table checkbox select all, hear for Check uncheck all multiple checkboxes with AngularJS we will give you demo and example for implement. Join the community of millions of developers who build compelling user interfaces with Angular. In this post, we won’t cover the CSS file for this component as it is not Angular specific, but you can dig into the source code in the included working code example below. Angular Material Checkbox module MatCheckbox proves very handy in creating such lists with a number of properties. AngularJS How to generate list of checkbox and bind from json [Answered] RSS 1 reply Last post May 13, 2016 02:07 AM by Fei Han - MSFT. Step by step beginner's tutorial on how to use Angular Material Checkbox. size 'small' | 'medium' 'medium' The size of the checkbox. Above I define a component with a single checked input (or property) and a single click output (or event). JQuery version also available. To modify the default functionality of checkboxes and use like the radio buttons, you need to restrict the user to select multiple checkboxes. Here in this tutorial we are going to explain how you can set checkbox checked in AngularJs. The difference between Switch and Checkbox is that Switch will trigger a state change directly when you toggle it, while Checkbox is generally used for state marking, which should work in conjunction with submit operation. Nested ng-repeat in AngularJS with Checkboxes. so you can check also there. If they are not selected or checked, there is no match. Anyway, here's a quick demo - in this case, I'm using good-old jQuery to bind to the events just to clarify that this has absolutely nothing to do with Angular 2. I have found some documentation on how to complete this but I have one little thing I need to add. Angular 4 Checkbox Select All Deselect All. The value of count variable is increment by 1 as you checked and unchecked the checkbox and below the checkbox we display the value of isTrue variable which is bind with this checkbox. We can control the label position using labelPosition property of. This is what I have:. In Angular one checkbox is linked with one model. Kindly let me know how to do. I have a checkbox which I need to monitor in such a way that I run some code only if its the user changing the state of the checkbox, but not if the state changes because the bound underlying data causes it to change its state. Yes, I am one o. I have explained the same using Angular js 1 and Jquery. ' in angular 2 application. On the checked event of. Angular + Typescript Demo Plunk. 'Please do not use bootstrap-checkbox element in label element. Tri-State Check Box in HTML with AngularJS and TypeScript 26 February 2015 - AngularJS , HTML , TypeScript HTML does not support tri-state checkboxes by default. Reactjs input type checkbox onchange. We'll start with a really simple example: reacting to a click event on an element. UI Components for Angular. concatMap subscribes to that “inner Observable” and proceeds with the next only once the previous one “completes”, thus guaranteeing ordering of our events. Assistive technology products should do the following:. UI component infrastructure and Material Design components for mobile and desktop Angular web applications. In below block, we have declared 3 functions each for change event of CheckBox, TextBox and DropDown respectively. You can add custom styles to the CheckBox by using this property. We will provide demo using template-driven form and reactive form. The approached used here is not working for me. The :checked pseudo-class in CSS selects elements when they are in the selected state. receive the event and check if checkbox is checked before adding property. HTML Tag Reference HTML Event Reference HTML Color JavaScript Reference HTML DOM Reference jQuery Reference AngularJS // If the checkbox is checked, display. Add new column to the DataGrid component and select displayName property. Let's look at an example of how we can use the ng-model with the "textbox" and "checkbox" input type. If you are working with forms in AngularJS, I am sure you have come across a situation where you have checkboxes in your AngularJS form and you want to check if a user has selected (or checked) one of the checkboxes before submitting the form. This is called cascading changes to checkbox values. HTML5 allows specifying indeterminate ("partially" checked) state for checkboxes. This piece of code takes a chunk of data and creates checkboxes based on properties on the data. Conditionally handling the submit event. As a part of this release, we are synchronizing the major versions going forward for the framework packages (@angular/core, @angular/common, @angular/compiler, etc), the Angular CLI, and Angular Material + CDK. type: string: The. You should play with attributes of tag:. below is the code for reference:-. This piece of code takes a chunk of data and creates checkboxes based on properties on the data. Help Angular by taking a 1 minute survey !. AngularJs Get Checkbox Value | Multiple Checkbox Value - While using the html form input elements we sometimes need checkboxes. That file contains the following HTML:. It creates a little recursion but is the fastest and easiest way to play ball. type: string: The. The status of the CheckBox i. Specifies whether CheckBox has to be in checked or not. Angular Bootstrap checkbox Angular Checkbox - Bootstrap 4 & Material Design. A cross browser compatible JavaScript function to select or de-select all checkboxes in a form. And i had taken Enable callbacks in My Gridview as true. Angular CheckBox Component. Events: CheckedChanged - This event is fired when the checked status of the check button control is changed. Ask Question Angular 5 checkbox checked default but its not triggering the change event. TAGs: CheckBox, Div, AngularJS. ng-change example - textbox checkbox demo As such, the JavaScript also supports onchange event where you may perform a certain action as the value in an …. This page will walk through Angular Material checkbox example. Here is what I am wanting to do. Using jQuery you can determine if a checkbox has been checked, performing an action based on the result. In this article, I'm going to perform an operation with checkbox in Angular 8 using Web API and SQL Server. Dynamic Checkbox Filters in AngularJS. x doesn’t come with such a (built-in) two-way data binding anymore. UI component infrastructure and Material Design components for Angular web applications. It will be a second delay for checkbox to appear because of our imaginary backend call. 'Please do not use bootstrap-checkbox element in label element. You can use ng-checked to check a checkbox in AngularJs. Default value. Inside this anonymous function we are having the same if statement we used in the previous example to check whether the checkbox is checked or not. If you want to compare the implementation please check those as well. Here, i will show you two way to make all checkbox checked and unchecked on button click event in angular js. A step by step tutorial on handling multiple checkboxes in Angular 8|9, we will learn how to create, select and unselect multiple checkboxes and validate checkboxes with Angular Reactive Forms. You're attempting to handle the data binding yourself by creating arrays to store objects based on the click event. I believe this is not an angular material2 issue. TAGs: CheckBox, AngularJS. exe Categories Angular, Angular 5, Angular 6, Angular 7, Angular Material Tags Angular Create Muti Parent Checkbox List, Angular Muti Checkbox for Master in List, Automatically Check Parent Checkbox if Child is Selected Angular 2, Create Parent Child Checkbox List in Angular 4, Create Parent. checked=true|false 说明. download angular 7 checkbox free and unlimited. We will provide demo using template-driven form and reactive form. The :checked selector works for checkboxes, radio buttons, and options of select elements. AngularJs Get Checkbox Value | Multiple Checkbox Value - While using the html form input elements we sometimes need checkboxes. A step by step tutorial on handling multiple checkboxes in Angular 8|9, we will learn how to create, select and unselect multiple checkboxes and validate checkboxes with Angular Reactive Forms. In HTML, you cannot set the checked attribute to false (the presence of the checked attribute makes the element checked, regardless of its value). Using jQuery you can determine if a checkbox has been checked, performing an action based on the result. If you have multiple checkbox list or in table rows then we can get all checked checkbox value in string or array in jquery. By default Angular and Material checkboxes bind to boolean properties. If you want to set the input focus, to a specific checkbox, Call this method for that check box control. Angular2 Multiselect Dropdown. To retrieve only the selected options of select elements, use the :selected selector. In this article, I'm going to perform an operation with checkbox in Angular 8 using Web API and SQL Server. bower install angular-ui-grid. In this part we'll discuss Angular 5 Role Based Authorization with Web API. The idea is that at least one check box should be checked. Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, PHP, Python, Bootstrap, Java and XML. In this article I will discuss, how to delete multiple records from the table using checkbox. In this article we’re going to explore how two-way data binding in Angular >= 2. Assistive technology products should do the following:. Conclusion. Checkbox Plays a key role in forms. Bind Click event for radio button in Angular 2. Using custom template, you can add a CheckBox element to the Accordion Header. Step by step beginner's tutorial on how to use Angular Material Checkbox. If the expression inside the ng-checked attribute returns true then the checkbox/radiobutton will be checked otherwise it will be unchecked. 该属性保存了 checkbox 的当前状态,不管何时,这个值发生变化的时候,onclick 事件句柄就会触发(也可能触发 onchange 事件句柄)。. In Spring MVC, is used to render a HTML checkbox field, the checkbox values are hard-coded inside the JSP page; While the is used to render multiple checkboxes, the checkbox values are generated at runtime. It also allows us to add any condition we want within our if and else statement. Here's how-to in ng1 and ng2. Checkboxes are for selecting one or several options in a list, while radios are for selecting one option from many. The check all function finds all checkboxes in a designated form, regardless of the checkbox name. Restrict the user to select multiple checkboxes and allow only one checkbox at a time jQuery. Check how easy it is to use Row and Multi-cell data select of the Ignite UI for Angular Material table by using angular events, API or with mouse interactions. In this article, we are going to learn about Angular Material Navigation, how to create it and make it fully responsive with side bar and main nav menu. mat-checkbox Label. like this Html Side , Assign variable in ng-model [code] custom element using an Angular and TypeScript. When we receive a checked event, then we execute the async call, otherwise we trigger an action for removing the item from the list. The default styling is done according to the selection controls specification as per the Material Design guidelines. When ng-checked has a true condition it makes status checked in other hand when given condition is false status of input (type: radio, checkbox ) become unchecked. Some sample code is provided under Using the code heading and complete code is available in the project download. I have explained the same using Angular js 1 and Jquery. Home » Angularjs » how to show/hide a div on the basis of a checkbox selection in angular js how to show/hide a div on the basis of a checkbox selection in angular js Posted by: admin December 8, 2017 Leave a comment. In Material Checkbox module there are three states with Checked and Unchecked which are common, but there is also a third state called Indeterminate which is a middle of these two. JSFiddle or its authors are not responsible or liable for any loss or damage of any kind during the usage of provided code. View on Github. These allow us to emit change or any custom event names from a custom component in Angular. If you want to compare the implementation please check those as well. Defaults to false. These are still the essential things to consider for accessibility as it relates to Angular and all client-rendered frameworks. AngularJS is what HTML would have been, had it been designed for building web-apps. Angular checkbox change event not firing. It is modeled after the browser's native checkbox element, and behaves in the same way. We'll take a look at the ways to bind checkboxes and radio buttons to data variables and the ways we can tweak them. They would like to read the data from other fields in the row when the checkbox is checked. prop() method:. if I select all checkboxes to be checked and then uncheck one or more and then hit submit, then the form will still act as if all the checkboxes were checked ! Try and imagine what would happen if this was implemented into a form where a user could delete something…. For AngularJS (1. You have to put 2 things inside your html: (Checked)="some logic" (Click)="method()" this method in your ts file should open a confirmation pop-up or whatever you want it to do before it manipulates the logic that makes the checkbox checked or not. Here, i will show you two way to make all checkbox checked and unchecked on button click event in angular js. To get started with the Ignite UI for Angular Checkbox install Ignite UI for Angular by typing the following command: ng add igniteui-angular. bower install angular-ui-grid. I can not get the checkboxes to maintain state after pagination. As I will cover this Post with live Working example to develop Select all and Deselect all checkboxes in angularjs, so the Select and Deselect All Checkboxes using AngularJS for this example is following below. Using jQuery you can determine if a checkbox has been checked, performing an action based on the result. You could test with a native and it wouldn't behave the way you're expecting. I have a gridview bound to a datasource and I want to handle the postback for any specific checkbox associated with the list of students. Angularjs set checkbox checked : There are many ways to set checkbox checked on button click. At its core, the checkbox component allows for a choice between selected/unselected state. checked para poder ver si esta seleccionado, así es como. Step by step beginner's tutorial on how to use Angular Material Checkbox. Conditionally handling the submit event. AngularJS is what HTML would have been, had it been designed for building web-apps. Now when Angular instantiates this form each checkbox with be wired up to our form, we declared in the TypeScript code. mat-checkbox Label. Ask Question Angular 5 checkbox checked default but its not triggering the change event. This time I will do the same job using Angular Reactive Forms. Add a "click" listener to each checkbox in the list that unchecks the "check all" box if unchecked and you have the perfect solution!. jQuery change event on checkbox Posted by Nelson on June 4, 2010 Leave a comment (19) Go to comments A lot of times, you'll want to call a javascript function when a checkbox is changed from unchecked to check and vice versa. Not only is that a problem visually, but it also means an item can be selected. So you can get the checked node data alone in that event using following code block. Hope this year brings many successes to all of you guys and also for me. Defaults to. I was setting up an HTML form today and I wanted to group some options together in a multi checkbox set, allowing a user to select multiple options in a category. Ask Question Angular 5 checkbox checked default but its not triggering the change event. Global Events. All code belongs to the poster and no license is enforced. The ng-checked directive is necessary to be able to shift the value between true and false. Angular 4 Checkbox Select All Deselect All. Anyone having problems with javascript or jquery checkbox AdminLTE bootstrap framework ? Problems such as the onclick event is not working, checked method doesn't work and others. Create new page, drop DataGrid component and bind it to Microsoft Graph users entity. TAGs: CheckBox, AngularJS. Checkbox Plays a key role in forms. You can set the initial state with the CHECKED attribute, while the checked property contains the actual state of the control. API Reference Documentation for the Angular CheckBox User Interface Component jqxCheckBox. Manually select all records within the click event of the checkbox for selecting all records in the header. Here I am going to discuss about implementing a select all/deselect all checkbox using Angular 2+. Now let's bind an event handler to the. I used Angular Material styles. If you are looking for a quick jQuery snippet that toggles multiple check-boxes checked status simply by clicking "Select All" checkbox (like in Gmail and many other web applications), here's are few examples that might be useful for your HTML form. Posted by: admin November 11, 2017 Leave a comment. We can control the label position using labelPosition property of. This example will show you how to add checkbox to each android listview item. As it is unchecked, the options vanish. x is implemented and how we can implement it in our own directives. Angular Change Detection - How Does It Really Work? Last Updated: 26 April 2019 local_offer Angular Core The Angular change detection mechanism is much more transparent and easier to reason about than its equivalent in Angular 1. The check all function finds all checkboxes in a designated form, regardless of the checkbox name. This post explains how to retrieve or bind multiple checkbox selected options from a checkbox list in AngularJS. Label position can be before or after the checkbox. bower install angular-ui-grid. There is a click event to toggle the value. We probably do not need this in most cases, unless we have a dynamic value like aria-checked for example. Angular does the two way binding for you. Restrict the user to select multiple checkboxes and allow only one checkbox at a time jQuery. It does not show the DIV after selecting the checkbox. A checkbox allows you to select single values for submission in a. Track tasks and feature requests. com/2018/02/angul. As a part of this release, we are synchronizing the major versions going forward for the framework packages (@angular/core, @angular/common, @angular/compiler, etc), the Angular CLI, and Angular Material + CDK. Declarative templates with data-binding, MVC, dependency injection and great testability story all implemented with pure client-side JavaScript!. HTML checkboxes are used to let a user select one or more options for a limited number of choices. To find checkbox is been checked or not check the defined model. Otherwise if there is at least one child item with checked or indeterminate state, set the parent checkbox value to indeterminate. If the expression inside the ng-checked attribute returns true then the checkbox/radiobutton will be checked otherwise it will be unchecked. md-checkbox. Hi, In my project i have used primeNg checkbox for better UI. js and jscript are also welcomed. I was knowing one way to find out but there are couple of other ways as well to find out if checkbox is checked using jQuery. Here Mudassar Ahmed Khan has explained with an example, how to show hide (toggle) HTML DIV on CheckBox click i. It would be with angular itself. Angular is a platform for building mobile and desktop web applications. kendoWidgetCreated is emitted after a single widget is created while kendoRendered is emitted after all widgets that are defined on the page are created. x to bind the click event but things changed in Angular 2. AngularJS How to generate list of checkbox and bind from json [Answered] RSS 1 reply Last post May 13, 2016 02:07 AM by Fei Han - MSFT. Custom Single-Check Directive. I can not get the checkboxes to maintain state after pagination. Inside this anonymous function we are having the same if statement we used in the previous example to check whether the checkbox is checked or not. Otherwise if there is at least one child item with checked or indeterminate state, set the parent checkbox value to indeterminate. AngularJS is what HTML would have been, had it been designed for building web-apps. Check if radio button is checked or selected using jQuery; Validate HTML CheckboxList using jQuery; Limit number of checkboxes checked by User; Disable odd checkbox of Checkbox list using jQuery; 1. If you want to compare the implementation please check those as well. How to change the color of a row in ng-repeat table when checkbox is clicked in angularjs. Hope this year brings many successes to all of you guys and also for me. The value of count variable is increment by 1 as you checked and unchecked the checkbox and below the checkbox we display the value of isTrue variable which is bind with this checkbox. Angular Bootstrap checkbox Angular Checkbox - Bootstrap 4 & Material Design. If you need to represent the switching between two states or on-off state. How do you handle multiple checkboxes in your projects? Any advice on how to simplify this, or make it more Angular-ish? Thanks!. The check all function finds all checkboxes in a designated form, regardless of the checkbox name. The value of count variable is increment by 1 as you checked and unchecked the checkbox and below the checkbox we display the value of isTrue variable which is bind with this checkbox. A common option is to use a checkbox which can be clicked on to toggle row selection, which can be particularly useful if you wish to restrict row selection activation to a particular column, so other actions can be performed on the other cells in the table (such as inline editing). This is called cascading changes to checkbox values. What we're really talking about here, though, is how to "think in Angular," even though we are still using jQuery-like functions in the implementations. Using the jQuery prop() Method The jQuery prop() method provides a simple, effective, and reliable way to track down the current status of a checkbox. Description of ng-checked: ng-checked has priority 100. A Pen by aaron k saunders on CodePen. I have an onSubmit for the form and a JS function that suppose to check it but it does not work. All code belongs to the poster and no license is enforced. Whenever, a user selects a value from the dropdown list, the on change event will call the function to enable or disable the checkboxes. AngularJs Get Checkbox Value | Multiple Checkbox Value - While using the html form input elements we sometimes need checkboxes. If you need to represent the switching between two states or on-off state. If checkbox in datagridview is checked then a message box display which have true and if checkbox in datagridview is unchecked then a message box display which have false value. AngularJS How to generate list of checkbox and bind from json [Answered] RSS 1 reply Last post May 13, 2016 02:07 AM by Fei Han - MSFT. Is there a way if where I can manually get the selected rows of the table by using the table id and make them selected while checking the check box?. Let's look at an example of how we can use the ng-model with the "textbox" and "checkbox" input type. As I will cover this Post with live Working example to develop Select all and Deselect all checkboxes in angularjs, so the Select and Deselect All Checkboxes using AngularJS for this example is following below. we will use ng-model and ng-checked for doing simple check uncheck toggle event. I have a checkbox which I need to monitor in such a way that I run some code only if its the user changing the state of the checkbox, but not if the state changes because the bound underlying data causes it to change its state. required: bool: If true, the input element will be required. Here we will learn what is ng-change event directive in angularjs, use ng-change event with input text control with example, how to use ng-change event with checkbox in angulajrs and use ng-change event with select / dropdownlist with example in angularjs applications. Install the package : npm install angular2-multiselect-checkbox-dropdown. The CheckBox is a small box, which when selected by the end user, shows that a particular feature has been enabled or a specific option has been chosen. For the first time the above code workd fine ie when checkbox is selected and DIV hides on deselecting the checkbox. Add new column to the DataGrid component and select displayName property. AngularJS is what HTML would have been, had it been designed for building web-apps. Configurable. I will give you very basic example and demo so you can see how it get selected checkbox value in jquery. At previous post I created checkbox group component using template data binding. Lets consider we have the document setup below and see how to test checkbox checked using different versions of jQuery. It would be with angular itself. Note that you can get the selected result by subscribing to the event in. Angular will check the directive bindings for each change detection cycle in our application. JQuery version also available. Today will be a quick tutorial on dealing with checkboxes and radio buttons in Angular forms. With the help of onClick event, JavaScript function and this keyword, we can pretty easily check If the checkbox is checked. type: string: The. I can go by foot and check my array if any value is inside. As a part of this release, we are synchronizing the major versions going forward for the framework packages (@angular/core, @angular/common, @angular/compiler, etc), the Angular CLI, and Angular Material + CDK. To display a checkbox next to each TreeView item, set the checkboxes property to true. Indeterminate Checkbox state indicates that some. If you have multiple checkbox list or in table rows then we can get all checked checkbox value in string or array in jquery. But in practice we usually want one model to store array of checked values from several checkboxes. AngularJs Get Checkbox Value | Multiple Checkbox Value - While using the html form input elements we sometimes need checkboxes. Making fields required when checkbox is checked. ToString("c") End If ' Manually register the event-handling method for the ' CheckedChanged event of the CheckBox control. It's very easy to implement and has lots of features. Supported elements. This property reflects the HTML checked attribute. You can also use our online tool to run and edit the code. We'll take a look at the ways to bind checkboxes and radio buttons to data variables and the ways we can tweak them. In this event handler, you can check whether the group is checked, if it is you can cancel the selection process. You can also render a specific checkbox as checked by collecting the provided information and using the isChecked property. But, in WijGrid widget, there is a different way for achieving the same requirement. Description of ng-checked: ng-checked has priority 100. In this tutorial, we have seen how to install and setup material design in Angular and how to import various material modules, and how to create material checkbox form, and how to get the checked values of the checkbox. But after the first time its not working. To find checkbox is been checked or not check the defined model. In this article I will discuss, how to delete multiple records from the table using checkbox. Select all/deselect all checkbox using angular 2+. If they are not selected or checked, there is no match. A lightweight attribute directive which calls checkbox() on the element with the settings object passed to the attribute. When ng-checked has a true condition it makes status checked in other hand when given condition is false status of input (type: radio, checkbox ) become unchecked. true if the CheckBox is in the checked state; otherwise, false. isDefaultPrevented(). As you may have heard, Angular has dropped 2-way bindings, so to create the same effect we have to rely on a combination of event and property bindings. Ng-checked is basically used to set the selection of check boxes and radio buttons etc, Here in our example we are taking 1 check box and 2 radio buttons where radio buttons are dependent on check box selection means one radio button will be selected if check box is checked and other one is selected if check box is unchecked. Reactjs input type checkbox onchange. Today, We want to share with you Angularjs multiple Check and uncheck all checkbox. If given expression in ng-show attribute is true then the HTML element will display otherwise it hide the HTML element. Text version of the video http://csharp-video-tutorials. Angular does the two way binding for you. com/2018/02/angul. In this video we will discuss checkbox validation in Angular with example. I am populating data in a list and now to need to fill data in the textbox of the row where checkbox is checked.