• Resolved dhobeika

    (@dhobeika)


    Is there something I can add to the pdb_single so that if a certain profile field was not filled out, it won’t display? For example, if on some of the profiles, the field for “age” was not filled out, it won’t get displayed as “Age” with nothing next to it? I’d prefer that fields that don’t have data associated with them because that part of the profile wasn’t filled out don’t display that field if there is nothing to display.

    I don’t want to remove that field though because half the profiles have ages and the other half don’t, I just don’t want age to display on the half that didn’t enter ages.

    https://www.ads-software.com/extend/plugins/participants-database/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter dhobeika

    (@dhobeika)

    Can anyone help with this?

    Plugin Author xnau webdesign

    (@xnau)

    dhobeika,

    Yes, there is a way. When a field is blank, it’s wrapping element is given a class of “blank-field” so you can alter how it is displayed in your theme stylesheet.

    The simplest thing to do is just:
    .blank-field { display:none }

    Note that these are general instructions, you may need to do things a little differently depending on your theme.

    Thread Starter dhobeika

    (@dhobeika)

    Thanks so much! This works great!

    One other question — I have several photo upload fields. Is there any way to have the photos display as thumbnails (maybe around 150 px wide) and then people can click on the thumbnails to get a bigger image?

    I tried adding dd.photo_1 to my stylesheet and setting a max width of 150 px but that didn’t work right.

    Thanks again!

    Plugin Author xnau webdesign

    (@xnau)

    dhobeika,

    OK, the best way to resize images using CSS is to set either the height or width of the image and set the other dimension to auto like this:
    img { width:150px; height:auto }
    Don’t use that code as-is, obviously! Your example has the selector “dd.photo_1” if it’s the IMG that has the class of “photo_1” you’ll be fine. The rule has to target the IMG tag directly. If you’re expecting images smaller than that, you can use “max-width” to prevent enlarging the image, but you’ll have to include “display:block” for it to work in most browsers.

    Thread Starter dhobeika

    (@dhobeika)

    How would I get the thumbnails to link to the full size image?

    Thread Starter dhobeika

    (@dhobeika)

    Is there any way to get the thumbnails to link to the full sized image? Thanks!

    Please let me know where and how the field to hide empty fields would go in my theme css. I’m not sure where to paste the code and if it should be exactly as shown in the example above. Thank you.

    Thread Starter dhobeika

    (@dhobeika)

    Any update on how to get the thumbnails to link to the full-sized image?

    Plugin Author xnau webdesign

    (@xnau)

    dhobeika,

    No this is not possible at this time.

    As an aside: it’s best to post a new thread if you have a new question…this thread was resolved, so your new question was missed.

    Plugin Author xnau webdesign

    (@xnau)

    ecn,

    This would go in your theme stylesheet.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Plugin: Participants Database] Hiding a Field Without Data on pdb_single Page’ is closed to new replies.