• Resolved elizjones

    (@elizjones)


    When displaying a single record is there a way to hide fields that are empty?

    We are using this for an employee database that the public can access (via QR code, directly to the single record). We capture information that may be required for some employees and not others, and in that case we don’t want to show a blank field.

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author xnau webdesign

    (@xnau)

    This can be achieved by using a CSS rule that hides empty fields. In the display fields with no data are given a class and you can use that class to hide those fields. For example:

    .pdb-single .blank-field {
       display: none;
    }

    rules like this can go in the Custom CSS setting of the plugin.

    Thread Starter elizjones

    (@elizjones)

    Amazing! Thank you!

    Thread Starter elizjones

    (@elizjones)

    I’ve got a follow up to this question:

    Is there a way to hide the Group Title if all of the fields in that group are blank?

    I don’t know much CSS, and the best I could do is hide the group title in all instances, but it doesn’t make much sense when some of the fields are displaying.

    Thanks again!

    Plugin Author xnau webdesign

    (@xnau)

    Did you look for a classname on the group wrapper that tells when the group is empty? Should be ‘pdb-group-novalues’ Use that to hide the whole group.

    Thread Starter elizjones

    (@elizjones)

    Thanks Roland! That worked perfectly!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Hide Empty Fields in Single Record’ is closed to new replies.