Home > Web Front-end > JS Tutorial > About removing textfield methods from form in Ext: hide(), setVisible(false), remove()_javascript tips

About removing textfield methods from form in Ext: hide(), setVisible(false), remove()_javascript tips

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-16 18:14:49
Original
1231 people have browsed it

Problem: When using the hide() method and setvisible(false) method to remove the middle of the items (I have seen many examples where the tail forms are removed), the original form verification is invalid
Solution: Use the remove(id) method Remove the form and get a valid form
Reason: Unknown, I hope you can add it
Supplement: The following is a simplified version of the problem code I encountered. It has not been tested. It probably means that if you want to control the problem in the form, Display the form, using the remove() method is valid

Copy the code The code is as follows:

new Ext. form.FormPanel({
id : 'ReportForm',items : [{
{id:"001"},
{id:"002"},
{id:"003"} ,
{id:"004"},
{id:"005"}
}]
});

//Ext.getCmp("ReportForm"). getForm().isValid() validation is invalid
if(isTQ == 0){
Ext.getCmp("003").hide();
}

//Ext. getCmp("ReportForm").getForm().isValid() validation is invalid
if(isTQ == 0){
Ext.getCmp("003").siteVisible(false);
}

//Ext.getCmp("ReportForm").getForm().isValid() is verified to be valid
if(isTQ == 0){
Ext.getCmp("ReportForm").remove(" 003");
}
Related labels:
ext
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template