Search code examples
javascriptextjsextjs4extjs5

Query a form excluding some fields in Extjs


I have a container which have some list for forms. I am writing a query to get all the fields which have some value.

 var value = 'gettingFromATextField';

mainPanel.query('form > field[value*='+value+']');

it is retrieving all the fields which have that value.How to exclude some fields even it matches the value. for Example if i have textfield Test ,Even if the value matches the Test field should not be retrived. Kindly help me


Solution

  • I found the answer

    we can use != Operator

         mainPanel.query('form > field[value*='+value+'][name!=excludigFieldName]');