I'm maintaining a webapp with a feature dubbed the "rule form". It's essentially a complex HTML form that users use to build a "rule" with criteria that can be grouped into AND/OR blocks. When all the criteria are true, things happen that the user wants to happen. Think of it as a static query. Something like:
Animal
Fur Color:
IS Black
- OR -
IS NOT Brown
- OR -
IS White
- AND -
Weight:
>= 25 lbs
- AND -
Lives:
INSIDE Houses
- OR -
OUTSIDE Caves
- AND -
Species:
IS NOT Cat
- AND -
IS NOT Dog
- AND -
IS NOT Llama
End Animal
Important note: Root criteria (Fur Color, Weight, etc.) are always AND's in this tool. The sub-criteria within one root criterion are all either ORs or ANDs, not mixed.
After a user creates a rule, I'd like to be able to show the user a summary of that rule, which means figuring out an elegant way to visualize the complex criteria above. Any suggestions or links to it done well are welcomed. Thanks!
UPDATE
The webapp I'm maintaining is on a separate network, so I cannot provide a screenshot of the current HTML form, but it's quite similar to the answer provided by @kerr. Please note that I'm interested in a viewing capability only. While I'd love to be able to just load up the form when viewing a rule, there are times when that particular module is not available, which is why I'm having to develop a new "viewer". Thanks.