EasyUI Forum
May 15, 2024, 06:08:00 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Using Checkbox  (Read 3902 times)
Steve2106
Newbie
*
Posts: 20


View Profile Email
« on: November 09, 2019, 03:34:27 AM »

Hi There,

I'm having an issue using a checkbox.
I want to use one checkbox to show something is Active or In-Active.
If it's checked it means active if not checked it's in-active.
On the form declaration it has a value of 0, so it starts off unchecked.
<input class="easyui-checkbox" name="active" value="0" label="Active:">

When I call the save or update how can I know if the checkbox is checked or not.

Thanks for the help.

Best Regards,

Steve.
Logged
jahangir
Jr. Member
**
Posts: 51



View Profile Email
« Reply #1 on: November 10, 2019, 10:22:04 PM »

You can get checkbox checked property value like this.

Code:
$('#mychk').checkbox("options").checked
Logged
Steve2106
Newbie
*
Posts: 20


View Profile Email
« Reply #2 on: November 11, 2019, 03:43:28 AM »

Hi Jahangir,

Thank you for your reply.
So when I come to edit the record will the checkbox be shown as checked in the form if it's set in the record?

Best Regards,

Steve.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!