EasyUI Forum
September 14, 2025, 11:51:18 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: [SOLVED]How can I set checkbox and radiobutton readonly?  (Read 14652 times)
aiit
Newbie
*
Posts: 12


View Profile Email
« on: May 07, 2019, 05:16:37 AM »

How can I set checkbox and radiobutton readonly? Thanks.
« Last Edit: May 10, 2019, 05:04:51 AM by aiit » Logged
jahangir
Jr. Member
**
Posts: 51



View Profile Email
« Reply #1 on: May 07, 2019, 06:09:38 AM »

Try this
This will  work for both checkbox and radiobutton.
Code:
<input type="checkbox" onclick="return false;"/>
« Last Edit: May 07, 2019, 09:38:09 PM by jahangir » Logged
aiit
Newbie
*
Posts: 12


View Profile Email
« Reply #2 on: May 07, 2019, 07:25:29 AM »

Try this
This will  work for both checkbox and radiobutton.
Code:
<input type="checkbox" onclick="return false;"/>
/code]

thanks, but it is easyui-checkbox and easyui-radiobutton
Logged
jahangir
Jr. Member
**
Posts: 51



View Profile Email
« Reply #3 on: May 07, 2019, 09:25:17 PM »

Set disabled property to true.
Code:
 <input class="easyui-checkbox" disabled="true" name="fruit" value="Apple" label="Apple:">

or try this to make it readonly but not disabled..

Code:
<input class="easyui-checkbox" name="fruit" value="Apple" label="Apple:" 
    data-options="
onChange:function(checked){
  $(this).checkbox({checked: !checked});  
}
">
« Last Edit: May 07, 2019, 09:36:55 PM by jahangir » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #4 on: May 07, 2019, 11:54:19 PM »

Please set the 'readonly' property. Make sure to download the newest version from the site.
Logged
aiit
Newbie
*
Posts: 12


View Profile Email
« Reply #5 on: May 08, 2019, 07:18:30 PM »

Thank you very much.
Logged
aiit
Newbie
*
Posts: 12


View Profile Email
« Reply #6 on: May 08, 2019, 07:19:16 PM »

Please set the 'readonly' property. Make sure to download the newest version from the site.

Thank you!
Now all is working properly!
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!