EasyUI Forum
May 14, 2024, 05:45:42 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Combobox that is not Editable, but can be selected.  (Read 11922 times)
donlaur
Newbie
*
Posts: 2


View Profile Email
« on: October 26, 2015, 09:43:26 AM »

I want to make the combobox so that you can use as a dropbox and select an item, but the issue is that this combobox allows you to enter in your own field and option and save that.  I was to restrict options and I want people to select Illinois, not enter in IL in the combobox.  Editable false doesn't work, just makes where I can not select the dropdown.
Logged
jarry
Administrator
Hero Member
*****
Posts: 2264


View Profile Email
« Reply #1 on: October 26, 2015, 03:22:20 PM »

The editable property defines if the user can type text directly into the field. If you set it to false, you are not allowed to enter anything on the textbox but you can select options from the drop-down items.
Logged
korenanzo
Guest
« Reply #2 on: December 16, 2015, 02:26:57 AM »

The editable property defines if the user can type text directly into the field. If you set it to false, you are not allowed to enter anything on the textbox but you can select options from the drop-down items.

in this condition (editable:false) the options panel shows itself automatically when the user clicks into the textfield.


 Is it possible to switch it off, so that the panel is showed only if the user clicks the arrow?

thanks, RIc
Logged
jarry
Administrator
Hero Member
*****
Posts: 2264


View Profile Email
« Reply #3 on: December 17, 2015, 12:09:35 AM »

To disable the clicking behavior on the inputbox, please try this code:
Code:
$('#cc').combobox({
    editable: false,
    inputEvents: $.extend({}, $.fn.combobox.defaults.inputEvents, {
    click: function(){}
    })
})
Logged
korenanzo
Guest
« Reply #4 on: December 17, 2015, 12:48:35 AM »

thanks,
RIc
 Smiley
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!