|
Title: Issue when disabling input elements of a form Post by: r2ferna on March 07, 2014, 11:59:12 AM Hi !
I need to disable a form. So, I'm trying to disable all input elements. Code: $("#fm :input").prop("disabled", true);The text-box part is disabled as expected but the arrow-box part is active yet!! Disabling combo-boxes and date-boxes with its methods Code: $('#inpPt').combobox('disable'); $('#inpFeDesde').datebox('disable');I have many combo and date boxes, so I would not like to disable one by one or traversing all input elements for checking its class type and apply the corresponding method. How can I extend (if it's possible) the combo and date classes so they can be proper disabled? Thanks for your help! Title: Re: Issue when disabling input elements of a form Post by: stworthy on March 09, 2014, 03:47:58 AM Please try to extend a 'disable' method for form.
Code: <script> Now you can simply call 'disable' method to disable a form. Code: $('#fm').form('disable');Title: Re: Issue when disabling input elements of a form Post by: r2ferna on March 13, 2014, 11:14:38 AM Thanks stworthy.
The extended 'disable' method works fine !! Now, I'm facing another issue... How can I enable/disable the easyui-searchbox? I mean enable/disable the "searchbox-button", the textbox part is not the problem. Tanks in advance. Title: Re: Issue when disabling input elements of a form Post by: stworthy on March 15, 2014, 08:05:24 AM The 'disable' and 'enable' methods of searchbox plugin will be supported since next version. Please download the preview plugin from http://www.jeasyui.com/easyui/plugins/jquery.searchbox.js and include it to the page.
Title: Re: Issue when disabling input elements of a form Post by: devnull on December 06, 2014, 11:02:41 PM Hi;
Looks like this feature is not in the current version ?? anyway, I have extended the form and added a enable as well as the ability to omit a particular (key) field using it's class name or id etc: Code: $.extend($.fn.form.methods, { But it does not seem to be quite right, on some forms one or 2 elements don't get DISABLED, on other forms most fields are not disabled, and I cannot seem to track down the cause ! Title: Re: Issue when disabling input elements of a form Post by: devnull on December 07, 2014, 04:02:16 AM This now works now on textboxes & validateboxes , although it may not be the most efficient method:
Code: $.extend($.fn.form.methods, { Could this be added as a standard method for forms ? |