Answers.Body: <p>Make sure to add an if statement to check if the value exist or not with the <a href="https://docs.craftcms.com/v3/dev/filters.html#length" rel="nofollow noreferrer">length filter</a> for example.</p>
  
  <pre><code>{% if entry.videoPhoto50 | length %}
     &lt;img src="{{ entry.videoPhoto50  .....
     ....
  {% endif %}
  </code></pre>
  
  <p>So that your code is only executed if <code>entry.videoPhoto50</code> has a value.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-09T16:33:26.977Z
Answers.Text: Thanks, this works!
Answers.UserDisplayName: Sebastiaan Schillebeeckx
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-05T10:35:11.033Z
Answers.LastActivityDate: 2019-08-06T08:13:29.447Z
Answers.LastEditDate: 2019-08-06T08:13:29.447Z
Answers.UserDisplayName: Christopher Dosin
Body: <p>I made a content page (Channel) where the client can add a bunch of content. There will be multiple pages (1 page for every case) with the same layout. Sometimes they don't want to fill in every input field or asset. When they leave a field blank, I get an error.</p>
  
  <p>Is it possible to just not show the parts they didn't fill in?
  For example: When I put the website in 'production' they show the broken IMG instead of nothing.</p>
  
  <p><a href="https://i.sstatic.net/kGA3D.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/kGA3D.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.sstatic.net/V2emS.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/V2emS.png" alt="enter image description here"></a></p>
  
Tags: <channels>
Title: How to show nothing when you leave an input field empty in the entries instead of showing an error?
ThreadText: # How to show nothing when you leave an input field empty in the entries instead of showing an error?
  
  (Asked by: username_0 on 2019-08-05)
  
  I made a content page (Channel) where the client can add a bunch of content. There will be multiple pages (1 page for every case) with the same layout. Sometimes they don't want to fill in every input field or asset. When they leave a field blank, I get an error.
  
  Is it possible to just not show the parts they didn't fill in?
  For example: When I put the website in 'production' they show the broken IMG instead of nothing.
  
  [![enter image description here](https://i.sstatic.net/kGA3D.png)](https://i.sstatic.net/kGA3D.png)
  
  [![enter image description here](https://i.sstatic.net/V2emS.png)](https://i.sstatic.net/V2emS.png)
  
  **Tags:** channels
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-08-05. Score: 2 | Accepted answer
  
  Make sure to add an if statement to check if the value exist or not with the [length filter](https://docs.craftcms.com/v3/dev/filters.html#length) for example.
  
  ```
  {% if entry.videoPhoto50 | length %}
     <img src="{{ entry.videoPhoto50  .....
     ....
  {% endif %}
  
  ```
  
  So that your code is only executed if `entry.videoPhoto50` has a value.
  
  > **Comments:**
  > **username_0**: Thanks, this works!  
  
  ---
  
  