Cleaner way of formatting the boolean fields.

Includes the format string and function name only once, and factors in
the ternary operator.