Checkboxes (check boxes) are used primarily to receive user-selected options
As shown in the picture (please ignore the UI's bad look):
The main code for the pop-up window is as follows:
Copy Code code as follows:
var win = new Ext.window ({
Modal:true,
Title: ' Are you sure you want to reject the table? ',
WIDTH:500,
Plain:true,
Items: [FP]
});
Win.show ();
The pop-up window is the carrier, and the [FP] inside the items is the handle to form forms.
The specific definition is as follows:
Copy Code code as follows:
var fp = ext.create (' Ext.formpanel ', {
Frame:true,
Fielddefaults: {
labelwidth:110
},
WIDTH:500,
Bodypadding:10,
Items: [
{
Xtype: ' FieldSet ',
Flex:1,
Title: ' Are you sure you want to reject this sheet? ',
DefaultType: ' checkbox ',
Layout: ' Anchor ',
Defaults: {
Anchor: ' 100% ',
Hideemptylabel:false
},
items:[{
Fieldlabel: ' Please choose the reason for rejection: ',
Boxlabel: ' The table is not complete. ',
Name: ' Integrity ',
Inputvalue: ' 1 '
}, {
Name: ' Correct ',
Boxlabel: ' The table is not filled in accurately. ',
Inputvalue: ' 1 '
}]
}],
Buttons: [
{text: ' Confirm ', handler:function () {
The completeness and accuracy information is 1 not 0
if (Fp.getform (). IsValid ()) {
Console.log (Fp.getform (). FindField (' integrity '). GetValue ()? 1:0);
Console.log (Fp.getform (). FindField (' correct '). GetValue ()? 1:0)
}
Win.hide ();
}
},{
Text: ' Cancel ',
Handler:function () {
Win.hide ();
}
}]
});
This basically covers all the information of interest. The specific see API bar itself is not difficult
Focus on the value of the checkbox
Copy Code code as follows:
Console.log (Fp.getform (). FindField (' integrity '). GetValue ()? 1:0);
Console.log (Fp.getform (). FindField (' correct '). GetValue ()? 1:0)
These two words are the values of how to get integrity and correctness.