EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: r2ferna on July 29, 2014, 10:23:11 AM



Title: disabled numberbox elements issue
Post by: r2ferna on July 29, 2014, 10:23:11 AM
disabled numberbox elements still send their value to server when  submit the form
Code:
<input name="numCampos" id="inpNumCampos" class="easyui-numberbox" maxlength="6" style="width:40px" disabled value ="20">
<input name="numUsers" id="inpNumUsers"  maxlength="6" style="width:40px" disabled value="5">
the second one element works like supposed to be, but the first one still send its value on submitting form.
I tried different ways of disabling the element with no luck!

The form is pre-loaded with:
Code:
$('#fm').form('reset');

need I to specify something else in the numberbox plugin?

MTIA Guys!!



Title: Re: disabled numberbox elements issue
Post by: varonica on July 29, 2014, 06:46:27 PM
Try: disabled="disabled"
Code:
<input name="numCampos" id="inpNumCampos" class="easyui-numberbox" maxlength="6" style="width:40px" disabled="disabled" value ="20">


Title: Re: disabled numberbox elements issue
Post by: r2ferna on July 30, 2014, 08:43:47 AM
I did it, but it does not work!
In fact, I show the disabled attribute of this element
Code:
console.log($('#inpNumCampos').attr('disabled'));
just before the form submit, and it is disabled!!