Logic comparison operators – React version

Last Updated on May 14, 2023 by Neil Murray

Logic comparison operators – React version

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

Logic Operators – React 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

List of Logic comparison operators available with each field #

FieldLogic Operators (Not Available)
Acceptancechecked, unchecked
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

"=" (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 not available with each field #

FieldLogic Operators (Not Available)
Acceptance=, !=, >, <, >=, <=, changed, contains, 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

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)

Further Reading:

  • Item

Notes #

Add notes here

Comparison operators available on each field type – React version #

Backend

  • acceptance – unchecked, checked
  • checkbox (exclusive):
  • checkbox (non-exclusive): =, !=, contains
  • date – =, !=, >, <, >=, <=, changed, contains
  • email – =, !=, >, <, >=, <=, changed, contains
  • file – is empty, is not empty
  • number – =, !=, >, <, >=, <=, changed, contains
  • quiz – =, !=, >, <, >=, <=, changed, contains
  • radio – =, !=, >, <, >=, <=, changed, contains
  • range: =, !=, >, <, >=, <=, changed, contains
  • select (single): =, !=
  • select (multiple): =, !=
  • telephone – =, !=, >, <, >=, <=, changed, contains
  • text – =, !=, >, <, >=, <=, changed, contains
  • textarea – =, !=, >, <, >=, <=, changed, contains
  • url – =, !=, >, <, >=, <=, changed, contains

Frontend

  • acceptance: unchecked, checked
  • checkbox (exclusive): – =
  • checkbox (non-exclusive): =, !=, contains
  • date: =, !=, >, <, >=, <=, changed, contains
  • email: =, !=, >, <, >=, <=, changed, contains
  • file: is empty, is not empty
  • number: =, !=, >, <, >=, <=
  • quiz: =, !=, >, <, >=, <=, changed, contains
  • radio: =, !=
  • range: =, !=, >, <, >=, <=
  • select (single): =, !=,
  • select (multiple): =, !=, contains
  • telephone: =, !=, >, <, >=, <=, changed, contains
  • text: =, !=, >, <, >=, <=, changed, contains
  • textarea: =, !=, >, <, >=, <=, changed, contains
  • url: =, !=, >, <, >=, <=, changed, contains