Answers.Body: <p>File fields are used for uploading new images. To delete all the Assets for a field, submit a hidden field with no values.</p>
  
  <pre><code>&lt;input type="hidden" name="fields[assetsField]" value="" /&gt;
  </code></pre>
  
  <p>If, on the other hand, you want to retain some of them, then make that hidden field an array with the values you'd like to keep. Like this</p>
  
  <pre><code>&lt;input type="hidden" name="fields[assetsField][]" value="someAssetId" /&gt;
  &lt;input type="hidden" name="fields[assetsField][]" value="someOtherAssetId" /&gt;
  </code></pre>
  
  <p><code>someAssetId</code> and <code>someOtherAssetId</code> being the Asset IDs you'd like to keep for that field.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-07T16:03:39.883Z
Answers.Text: Thank you SO much :)
Answers.UserDisplayName: iamkeir
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-12T07:47:20.717Z
Answers.LastActivityDate: 2017-01-12T07:47:20.717Z
Answers.UserDisplayName: Andris Sevcenko
Body: <p>I see for users, I can add a hidden field <code>&lt;input type="hidden" name="deleteUserPhoto" value="1" /&gt;</code> to remove the uploaded photo, however I need to allow this functionality for an assets field in an entry form.</p>
  
  <p>I have tried submitting an empty file field, but it just retains the existing uploaded asset after submission. </p>
  
  <p>Is there a trigger similar to <code>deleteUserPhoto</code> that I can use here?</p>
  
Tags: <assets><entry><entry-form>
Title: How do I allow a user to remove an uploaded asset from a front-end entry form?
ThreadText: # How do I allow a user to remove an uploaded asset from a front-end entry form?
  
  (Asked by: username_0 on 2017-01-12)
  
  I see for users, I can add a hidden field `<input type="hidden" name="deleteUserPhoto" value="1" />` to remove the uploaded photo, however I need to allow this functionality for an assets field in an entry form.
  
  I have tried submitting an empty file field, but it just retains the existing uploaded asset after submission.
  
  Is there a trigger similar to `deleteUserPhoto` that I can use here?
  
  **Tags:** assets, entry, entry-form
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-01-12. Score: 8 | Accepted answer
  
  File fields are used for uploading new images. To delete all the Assets for a field, submit a hidden field with no values.
  
  ```
  <input type="hidden" name="fields[assetsField]" value="" />
  
  ```
  
  If, on the other hand, you want to retain some of them, then make that hidden field an array with the values you'd like to keep. Like this
  
  ```
  <input type="hidden" name="fields[assetsField][]" value="someAssetId" />
  <input type="hidden" name="fields[assetsField][]" value="someOtherAssetId" />
  
  ```
  
  `someAssetId` and `someOtherAssetId` being the Asset IDs you'd like to keep for that field.
  
  > **Comments:**
  > **username_2**: Thank you SO much :)  
  
  ---
  
  