In the workflow form, the drop-down box control will appear as follows because of the Ueditor editor
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/5C/91/wKioL1Ud6qGDBKfOAABugp1yl0M481.jpg "title=" Select0 (04-03-09-13-46). png "alt=" wkiol1ud6qgdbkfoaabugp1yl0m481.jpg "/>
When the value of the first drop-down item: When no content is entered, the generated select source code is as follows:
<select style= "width:80px;height:25px;" ><option> Please select </option><option value= "M" > Male </option><option value= "F" > Female </option ></select>
In this case, after the select control has the "required" property set, the Custom-valid.js function, the value of the default check that gets to is "Please select",
Because there is a value, the " required " check passes, but this does not achieve business purposes.
Modified Ueditor Source code of Custom-valid.js, in the original 127 line added
else if (element.is ("select")) {var option = $ (Element). Find ("option:selected"); value = $.trim ($ (option). val ());}
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/5C/91/wKioL1Ud6yKRza4JAACPWFlwe6Y365.jpg "title=" Select1 (04-03-09-13-46). png "alt=" wkiol1ud6ykrza4jaacpwflwe6y365.jpg "/>
The generated select source code is as follows:
<select style= "width:80px;height:25px;" ><option value= "" > Please select </option><option value= "M" > Male </option><option value= "F" > Female </option></select>
When the value of the first option is entered "" (a space string), when the Custom-valid.js file is checked, the value of the option that is selected by default is "" (an empty string), and the required check does not pass, thus achieving the business purpose.
This article is from the "South Lake Miner Technology Space" blog, please be sure to keep this source http://jncumter.blog.51cto.com/812546/1627894
Fix for check bug when key for Ueditor's select control is empty