Answers.Body: <p>You can try this css trick </p>
  
  <pre><code>div:empty {
     display: none;
  }
  </code></pre>
  
  <p>Or you can try using jQuery</p>
  
  <pre><code>$('div.section:empty').hide();
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-15T11:48:04.130Z
Answers.Text: Since I have multiple fields, CSS and jQuery will be complicated for me.
Answers.UserDisplayName: sharaths
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-15T11:53:20.070Z
Answers.Text: I haven't tried this, but it is applied to divs that meet the criteria of being empty rather than individual fields.
Answers.UserDisplayName: Aidan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-15T11:00:36.977Z
Answers.LastActivityDate: 2019-01-15T11:00:36.977Z
Answers.UserDisplayName: Tony Horrocks
Answers.Body: <p>As you are using Drupal you 'could' stop using the standard civicrm pages for this and build it out in Views, and then you can set the Fields in the View disply to not show if they are empty</p>
  
  <p>(not saying this is desirable or 'easy' but does not require code, css or jquery, but it does seem like a valid answer)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-16T07:50:35.057Z
Answers.Text: I agree, it is a valid answer.
Answers.UserDisplayName: Jaap Jansma - CiviCooP
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-15T20:58:35.890Z
Answers.LastActivityDate: 2019-01-15T20:58:35.890Z
Answers.UserDisplayName: petednz - fuzion
Answers.Body: <p>Are those fields visible on the event information page? If so you could uncheck the <code>public</code> setting at the custom field. You could do this by going to Administer --> Customize Data and Screens --> Custom Fields and then go to the Custom Fields of the custom group <code>Attachments</code> and for each field uncheck the public setting.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-15T09:31:43.090Z
Answers.Text: yes, those fields are visible on the event information page. Is this solution hide those fields when they don't have information?. What I want is When they have information I need to show those fields in the event information page.
Answers.UserDisplayName: sharaths
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-15T09:53:53.057Z
Answers.Text: I followed the steps as you suggested. If I uncheck the public settings. If those fields have the information it is not showing in the event information page.
Answers.UserDisplayName: sharaths
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-15T11:34:30.447Z
Answers.Text: Yes,  this setting is useful if you have administrative custom fields that you don't want to show on the public event pages, but it does not depend on whether there is data to show so it doesn't do quite what you need.  The css method below might suit you better.
Answers.UserDisplayName: Aidan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-15T11:49:07.983Z
Answers.Text: @Aidan Since I have multiple fields, CSS and jQuery will be complicated for me. Is there any other options or configurations to achieve this.
Answers.UserDisplayName: sharaths
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-15T08:08:07.460Z
Answers.LastActivityDate: 2019-01-15T08:08:07.460Z
Answers.UserDisplayName: Jaap Jansma - CiviCooP
Answers.Body: <p>How about using the ‘Complete Description’ field in the ‘Info and Settings’ section when configuring the event?</p>
  
  <p>Enter all the info you wish to display, including documents using the HTML editor -</p>
  
  <p><a href="https://i.sstatic.net/cQrBE.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/cQrBE.png" alt="enter image description here"></a></p>
  
  <p>And use the email and phone fields in the ‘Event Location’ section to display event contact information –</p>
  
  <p><a href="https://i.sstatic.net/syJZZ.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/syJZZ.png" alt="enter image description here"></a></p>
  
  <p>You then have full control over what to display with no empty values -</p>
  
  <p><a href="https://i.sstatic.net/9nVx3.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/9nVx3.png" alt="enter image description here"></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-17T22:38:02.160Z
Answers.LastActivityDate: 2019-01-17T22:38:02.160Z
Answers.UserDisplayName: Anil
Body: <p>Currently, I am using CiviCRM 4.7 version and integrated with Drupal 7.</p>
  
  <p>In the Event registration page sections like Event attachment, event committee, Event Contact showing as default. Please refer to the screenshot.</p>
  
  <p><a href="https://i.sstatic.net/GLQ37.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/GLQ37.png" alt="enter image description here"></a></p>
  
  <p>Question is, Can we hide those sections on the Event registration page for each event. If they don't have any information . if they don't have any information.</p>
  
  <p>Please guide me how to achieve this.</p>
  
  <p>If it is possible in a new version of CiviCRM 5.8, Please guide me how to achieve this.</p>
  
Tags: <civievent>
Title: How to hide civiCRM event sections like event attachment, event committee, Event Contact, Event Filter Informations when they don't have data
ThreadText: # How to hide civiCRM event sections like event attachment, event committee, Event Contact, Event Filter Informations when they don't have data
  
  (Asked by: username_0 on 2019-01-15)
  
  Currently, I am using CiviCRM 4.7 version and integrated with Drupal 7.
  
  In the Event registration page sections like Event attachment, event committee, Event Contact showing as default. Please refer to the screenshot.
  
  [![enter image description here](https://i.sstatic.net/GLQ37.png)](https://i.sstatic.net/GLQ37.png)
  
  Question is, Can we hide those sections on the Event registration page for each event. If they don't have any information . if they don't have any information.
  
  Please guide me how to achieve this.
  
  If it is possible in a new version of CiviCRM 5.8, Please guide me how to achieve this.
  
  **Tags:** civievent
  
  
  ---
  
  ## 4 answers
  
  ### Answer by username_1 on 2019-01-15. Score: 2
  
  You can try this css trick 
  div:empty {
     display: none;
  }
  
  Or you can try using jQuery
  $('div.section:empty').hide();
  
  > **Comments:**
  > **username_0**: Since I have multiple fields, CSS and jQuery will be complicated for me.  
  > **username_2**: I haven't tried this, but it is applied to divs that meet the criteria of being empty rather than individual fields.  
  
  ---
  
  ### Answer by username_3 on 2019-01-15. Score: 0
  
  As you are using Drupal you 'could' stop using the standard civicrm pages for this and build it out in Views, and then you can set the Fields in the View disply to not show if they are empty
  
  (not saying this is desirable or 'easy' but does not require code, css or jquery, but it does seem like a valid answer)
  
  > **Comments:**
  > **username_4**: I agree, it is a valid answer.  
  
  ---
  
  ### Answer by username_4 on 2019-01-15. Score: 0
  
  Are those fields visible on the event information page? If so you could uncheck the `public` setting at the custom field. You could do this by going to Administer --> Customize Data and Screens --> Custom Fields and then go to the Custom Fields of the custom group `Attachments` and for each field uncheck the public setting.
  
  > **Comments:**
  > **username_0**: yes, those fields are visible on the event information page. Is this solution hide those fields when they don't have information?. What I want is When they have information I need to show those fields in the event information page.  
  > **username_0**: I followed the steps as you suggested. If I uncheck the public settings. If those fields have the information it is not showing in the event information page.  
  > **username_2**: Yes,  this setting is useful if you have administrative custom fields that you don't want to show on the public event pages, but it does not depend on whether there is data to show so it doesn't do quite what you need.  The css method below might suit you better.  
  > **username_0**: @username_2 Since I have multiple fields, CSS and jQuery will be complicated for me. Is there any other options or configurations to achieve this.  
  
  ---
  
  ### Answer by username_5 on 2019-01-17. Score: 0
  
  How about using the ‘Complete Description’ field in the ‘Info and Settings’ section when configuring the event?
  
  Enter all the info you wish to display, including documents using the HTML editor -
  
  [![enter image description here](https://i.sstatic.net/cQrBE.png)](https://i.sstatic.net/cQrBE.png)
  
  And use the email and phone fields in the ‘Event Location’ section to display event contact information –
  
  [![enter image description here](https://i.sstatic.net/syJZZ.png)](https://i.sstatic.net/syJZZ.png)
  
  You then have full control over what to display with no empty values -
  
  [![enter image description here](https://i.sstatic.net/9nVx3.png)](https://i.sstatic.net/9nVx3.png)
  
  
  ---
  
  