Title: Suppressing empty fields
Last modified: March 27, 2019

---

# Suppressing empty fields

 *  Resolved [supernova42](https://wordpress.org/support/users/supernova42/)
 * (@supernova42)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/suppressing-empty-fields/)
 * I collect information with quite a lot of fields. Those fields are then displayed
   using the pdb-single shortcode. Several of the fields are empty. Is there a way
   of suppressing those empty fields from being displayed.
 * Thanks

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

 *  Plugin Author [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/suppressing-empty-fields/#post-11371781)
 * Take a look at the HTML source, you will see a class name on empty fields that
   you can use to hide them.
 *  Thread Starter [supernova42](https://wordpress.org/support/users/supernova42/)
 * (@supernova42)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/suppressing-empty-fields/#post-11372638)
 * Hi Roland
 * I did think that you might have pulled something out of your hat to suppress 
   the display of the empty fields.
 * I have now supressed the fields using the following. This is just part of the
   code as I have many fields, but it gives an idea of how it can be done. However,
   it’s possible that there might be an easier way.
 * $id= $_GET[‘pdb’];
    $data = Participants_Db::get_participant($id); $name = $data[‘
   name’]; $price = $data[‘price’]; $model = $data[‘model’];
 * if (empty($name)) {echo ‘<style>dt.name{display:none}</style>’;}
    if (empty($
   price)) {echo ‘<style>dt.price{display:none}</style>’;} if (empty($model)) {echo‘
   <style>dt.model{display:none}</style>’;}
 * Many Thanks
 *  Thread Starter [supernova42](https://wordpress.org/support/users/supernova42/)
 * (@supernova42)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/suppressing-empty-fields/#post-11373902)
 * Blast!!!
 * I’ve just discovered
 * .pdb-single .blank-field {
    display: none; }
 * Worked great….

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

The topic ‘Suppressing empty fields’ is closed to new replies.

 * ![](https://ps.w.org/participants-database/assets/icon-256x256.jpg?rev=1389807)
 * [Participants Database](https://wordpress.org/plugins/participants-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/participants-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/participants-database/)
 * [Active Topics](https://wordpress.org/support/plugin/participants-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/participants-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/participants-database/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [supernova42](https://wordpress.org/support/users/supernova42/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/suppressing-empty-fields/#post-11373902)
 * Status: resolved