Logic comparison operators – jQuery version

Last Updated on February 10, 2023 by Ajith

Logic comparison operators – jQuery version

Logic comparison operators are used to compare the value of fields in a CF7 Form

Logic Operators – jQuery version

  1. List of All Logic comparison operators
  2. List of Logic comparison operators available with each field
  3. List of Logic comparison operators not available with each field
  4. Limitations

List of All Logic comparison operators #

  1. = (Equal to)
  2. != (Not Equal to)
  3. > (Greater than)
  4. < (Less than)
  5. >= (Greater than or Equal to)
  6. <= (Less than or Equal to)
  7. changed
  8. contains
  9. checked
  10. unchecked
  11. is empty
  12. is not empty

TablePress

"=" (Equal to)"!=" (Not Equal to)">" (Greater than)"<" (Less than)">=" (Greater than or Equal to)"<=" (Less than or Equal to)changedcontainscheckeduncheckedis emptyis not empty
Acceptance
Date
Email
File
Number
Quiz
Radio Buttons
Telephone
Text
Textarea
URL
Range
Select(multiple)
Select(single)
checkbox(exclusive)
checkbox(non-exclusive)

List of Logic comparison operators available with each field #

Field Logic Operators (Not Available)
Acceptance checked, unchecked
Checkbox >, <, >=, <=, changed, checked, unchecked, is empty, is not empty
Date =, !=, >, <, >=, <=, changed, contains
Email =, !=, >, <, >=, <=, changed, contains
File is empty, is not empty
Number =, !=, >, <, >=, <=
Quiz =, !=, >, <, >=, <=, changed, contains
Radio Buttons =, !=
Telephone =, !=, >, <, >=, <=, changed, contains
Text =, !=, >, <, >=, <=, changed, contains
Textarea =, changed, contains
URL =, !=, >, <, >=, <=, changed, contains
Range =, !=, >, <, >=, <=
Select(multiple) = , !=, contains
Select(single) = , !=
checkbox(exclusive) =
checkbox(non-exclusive) =, !=, contains

List of Logic comparison operators not available with each field #

Field Logic Operators (Not Available)
Acceptance =, !=, >, <, >=, <=, changed, contains, is empty, is not empty
Checkbox >, <, >=, <=, changed, checked, unchecked, is empty, is not empty
Date checked, unchecked, is empty, is not empty
Email checked, unchecked, is empty, is not empty
File =, !=, >, <, >=, <=, changed, contains, checked, unchecked
Number checked, unchecked, is empty, is not empty
Range checked, unchecked, is empty, is not empty
Quiz checked, unchecked, is empty, is not empty
Radio Buttons checked, unchecked, is empty, is not empty
Select(multiple) >, <, >=, <=, changed, checked, unchecked, is empty, is not empty
Select(single) >, <, >=, <=, changed, contains, checked, unchecked, is empty, is not empty
Telephone checked, unchecked, is empty, is not empty
Text checked, unchecked, is empty, is not empty
Textarea !=, >, <, >=, <=, checked, unchecked, is empty, is not empty
URL checked, unchecked, is empty, is not empty

Limitations #

  1. Only strict comparison supported

Only strict comparison supported #

The comparison operator “=” in logic can be only used for strict comparison, if the logic statement have the value “hi” with logic operator “=” then the value is not equal to “Hi” in the frontend

Applied Logic

 

Strict Comparison – With exact value as the logic statement

 

Loose comparison – Using non-exact value (upper case letter instead of lower case)


List of Logic comparison operators available with each field #

FieldLogic Operators (Not Available)
BACKEND
Acceptancechecked, unchecked
Checkbox>, <, >=, <=, changed, checked, unchecked, is empty, is not empty
Date=, !=, >, <, >=, <=, changed, contains
Email=, !=, >, <, >=, <=, changed, contains
Fileis empty, is not empty
Number=, !=, >, <, >=, <=
Quiz=, !=, >, <, >=, <=, changed, contains
Radio Buttons=, !=
Telephone=, !=, >, <, >=, <=, changed, contains
Text=, !=, >, <, >=, <=, changed, contains
Textarea=, !=, >, <, >=, <=, changed, contains
URL=, !=, >, <, >=, <=, changed, contains
Range=, !=, >, <, >=, <=
Select(multiple)= , !=, contains
Select(single)= , !=
checkbox(exclusive)=
checkbox(non-exclusive)=, !=, contains
FieldLogic Operators (Not Available)
FRONT END
Acceptance=, !=, >, <, >=, <=, changed, contains, is empty, is not empty
Checkbox>, <, >=, <=, changed, checked, unchecked, is empty, is not empty
Datechecked, unchecked, is empty, is not empty
Emailchecked, unchecked, is empty, is not empty
File=, !=, >, <, >=, <=, changed, contains, checked, unchecked
Numberchecked, unchecked, is empty, is not empty
Rangechecked, unchecked, is empty, is not empty
Quizchecked, unchecked, is empty, is not empty
Radio Buttonschecked, unchecked, is empty, is not empty
Select(multiple)>, <, >=, <=, changed, checked, unchecked, is empty, is not empty
Select(single)>, <, >=, <=, changed, contains, checked, unchecked, is empty, is not empty
Telephonechecked, unchecked, is empty, is not empty
Textchecked, unchecked, is empty, is not empty
Textareachecked, unchecked, is empty, is not empty
URLchecked, unchecked, is empty, is not empty