EasyUI Forum
September 15, 2025, 04:40:21 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: how to change the required options  (Read 6999 times)
xuexiaodong
Newbie
*
Posts: 5


View Profile Email
« on: July 08, 2015, 08:33:31 PM »

 in real using ,sometimes one input is required,sometimes the  input is not required.
so i do as this
Code:
  $('#requiredType').combobox({
                onSelect: function (param) {
                    if (param=1)
{
   $('#DrpHA').combobox({ required: false });
}
else
{
$('#DrpHA').combobox({ required: true });
}
                }
            });

am I created the combobox more than once?
if i creates more than once, how to chang the options?

and i find if i hide the required input ,but when i post the form ,it will find the $("form").form('validate') is false,can not post the form
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: July 09, 2015, 07:29:11 AM »

You can call '.combobox' and pass a config object to re-create the combobox component. If you only want to disable the validation, please call 'disableValidation' method instead.
Code:
$('#cc').combobox({...});
// $('#cc').combobox('disableValidation');
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!