Answers.Body: <p>I have created a form with a hidden field and asset field. The hidden field appears before the asset field:</p>
  
  <p><a href="https://i.sstatic.net/s4qhU.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/s4qhU.png" alt="enter image description here"></a></p>
  
  <p>We'll want to make the email field required because we are using that field in the auto-generated subfolders. (if it is empty it will generate an error)</p>
  
  <p>Place a forward slash in before the folder location of the asset field: <code>/{jobid}/{email}</code></p>
  
  <p><a href="https://i.sstatic.net/a2KZf.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/a2KZf.jpg" alt="enter image description here"></a></p>
  
  <p>The <code>object</code> variable will not work in the Sprout Forms context. We can use the field handle (<code>{id}</code>, <code>{name}</code>...) or the <code>form</code> object (<code>{form.id}</code>, <code>{form.name}</code>...) if you want to be more specific.</p>
  
  <p>Regards.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-29T15:15:47.767Z
Answers.Text: Thanks! It seems like the key was just to rearrange the order of my fields and put the others before my assets field.
Answers.UserDisplayName: Mike Stecker
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-29T03:15:02.047Z
Answers.LastActivityDate: 2016-06-29T04:44:25.097Z
Answers.LastEditDate: 2016-06-29T04:44:25.097Z
Answers.UserDisplayName: Andre L.
Body: <p>Is it possible to use auto-generated subfolders within an asset field? Each time I've tried, I get errors upon submitting the form that seem unrelated and nothing posts.</p>
  
  <p>I'm just trying to do a simple job application form on our website and I'd like to have the file dumped into the subfolders: <code>{jobID}\{email}</code> (<code>jobID</code> is passed in as a hidden field), this way I know there won't be any issues uploading files unless the same person applies multiple times to the same position in which I guess I could put a timestamp on there as well.</p>
  
  <p>I've tried those simple variables mentioned above, and I've also tried <code>{object.jobID}\{object.email}</code> but no luck.</p>
  
  <p>Any help would be appreciated! Thanks!</p>
  
Tags: <assets><plugin-sproutforms>
Title: Using Asset folder variables with Sprout Forms
ThreadText: # Using Asset folder variables with Sprout Forms
  
  (Asked by: username_0 on 2016-06-28)
  
  Is it possible to use auto-generated subfolders within an asset field? Each time I've tried, I get errors upon submitting the form that seem unrelated and nothing posts.
  
  I'm just trying to do a simple job application form on our website and I'd like to have the file dumped into the subfolders: `{jobID}\{email}` (`jobID` is passed in as a hidden field), this way I know there won't be any issues uploading files unless the same person applies multiple times to the same position in which I guess I could put a timestamp on there as well.
  
  I've tried those simple variables mentioned above, and I've also tried `{object.jobID}\{object.email}` but no luck.
  
  Any help would be appreciated! Thanks!
  
  **Tags:** assets, plugin-sproutforms
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-06-29. Score: 2 | Accepted answer
  
  I have created a form with a hidden field and asset field. The hidden field appears before the asset field:
  
  [![enter image description here](https://i.sstatic.net/s4qhU.png)](https://i.sstatic.net/s4qhU.png)
  
  We'll want to make the email field required because we are using that field in the auto-generated subfolders. (if it is empty it will generate an error)
  
  Place a forward slash in before the folder location of the asset field: `/{jobid}/{email}`
  
  [![enter image description here](https://i.sstatic.net/a2KZf.jpg)](https://i.sstatic.net/a2KZf.jpg)
  
  The `object` variable will not work in the Sprout Forms context. We can use the field handle (`{id}`, `{name}`...) or the `form` object (`{form.id}`, `{form.name}`...) if you want to be more specific.
  
  Regards.
  
  > **Comments:**
  > **username_0**: Thanks! It seems like the key was just to rearrange the order of my fields and put the others before my assets field.  
  
  ---
  
  