# A single-page form where some fields change depending on the file the user picks to upload: Possible?

**URL:** <https://community.transloadit.com/t/a-single-page-form-where-some-fields-change-depending-on-the-file-the-user-picks-to-upload-possible/17978>\
**Category:** Transloadit\
**Tags:** tender-archive\
**Created:** [September 9, 2011, 6:06pm UTC](https://community.transloadit.com/t/a-single-page-form-where-some-fields-change-depending-on-the-file-the-user-picks-to-upload-possible/17978 "2011-09-09T18:06:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jaime\_Gomez\_Obregon](https://avatars.discourse-cdn.com/v4/letter/j/d9b06d/32.png) [@Jaime\_Gomez\_Obregon](https://community.transloadit.com/u/Jaime_Gomez_Obregon)\
**Post date:** [September 9, 2011, 6:06pm UTC](https://community.transloadit.com/t/a-single-page-form-where-some-fields-change-depending-on-the-file-the-user-picks-to-upload-possible/17978/1 "2011-09-09T18:06:00Z")

</div>

> Archived from the Transloadit support forum. Originally posted on September 9, 2011; details may be outdated, see [our docs](https://transloadit.com/docs/) for current behavior. [Original thread](https://web.archive.org/web/20111228074026/http://support.transloadit.com/discussions/questions/237-a-single-page-form-where-some-fields-change-depending-on-the-file-the-user-picks-to-upload-possible)

Hi all. I got a project for a client where I can finally try and use Transloadit 😃

Does anybody here know whether it’s possible to accept uploads from within a form _without_ actually submitting the main form? As if it were “a form inside a form”. I know the short answer is “no” 🙂

The scenario is a Javascript intensive form with many fields, some being multimedia uploads, and some fields and fieldsets depending on whether the user did actually upload a file or not in some of these upload fields.

Another way to put it: a single-page (single-submit) form where some of the fields dynamically change depending on the format of the file the user has chosen to upload.

Using frames or iframes is not an option. As I think this is not possible, because the upload actually starts when the user submits the form, I assume I will have to build it in two steps, but would be a notable usability drawback, as the upload could take minutes to finish and therefore the user will have to wait to see the sencond step of the form.

Perhaps the clever guys at Transloadit allow to close the connection just after sending the beginning of the file (enough for detecting it’s type), but that would still be a two-submit process, and wouldn’t allow things like displaying a thumbnail of the upload while the user fills in the rest of the fields.

Comments are welcome.

---

<div class="post-metadata">

**Author:** ![tim-kos](https://avatars.discourse-cdn.com/v4/letter/t/bbe5ce/32.png) [@tim-kos](https://community.transloadit.com/u/tim-kos)\
**Post date:** [September 11, 2011, 10:31am UTC](https://community.transloadit.com/t/a-single-page-form-where-some-fields-change-depending-on-the-file-the-user-picks-to-upload-possible/17978/2 "2011-09-11T10:31:00Z")

</div>

Hey Jaime,

we had a similar situation for one of our clients. What we did is build a two step form, but show the first part as soon as the upload _starts_. Then the user can first pick the file(s) to upload and add the meta information while they are uploading.

Also you can use the change event of the file input field to detect the names of the selected files and then change the DOM of your form depending on their file extension. This might not work so well with multifile uploads though as the input.value would equal the name of the first selected file.

Let me know if that helps.

Kind regards,  
Tim

---

<div class="post-metadata">

**Author:** ![Jaime\_Gomez\_Obregon](https://avatars.discourse-cdn.com/v4/letter/j/d9b06d/32.png) [@Jaime\_Gomez\_Obregon](https://community.transloadit.com/u/Jaime_Gomez_Obregon)\
**Post date:** [September 18, 2011, 11:58am UTC](https://community.transloadit.com/t/a-single-page-form-where-some-fields-change-depending-on-the-file-the-user-picks-to-upload-possible/17978/3 "2011-09-18T11:58:00Z")

</div>

Thank you, Tim. I will suggest the client a redesign of the workflow to handle the submission in two steps as you suggested.

---

<div class="post-metadata">

**Author:** ![tim-kos](https://avatars.discourse-cdn.com/v4/letter/t/bbe5ce/32.png) [@tim-kos](https://community.transloadit.com/u/tim-kos)\
**Post date:** [September 19, 2011, 6:53am UTC](https://community.transloadit.com/t/a-single-page-form-where-some-fields-change-depending-on-the-file-the-user-picks-to-upload-possible/17978/4 "2011-09-19T06:53:00Z")

</div>

Alright, closing this.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex032/uploads/transloadit/original/1X/04ee57da0cb7ac8728a9ac5965c288164f4ce280.svg) [@system](https://community.transloadit.com/u/system)\
**Post date:** [October 7, 2026, 9:37am UTC](https://community.transloadit.com/t/a-single-page-form-where-some-fields-change-depending-on-the-file-the-user-picks-to-upload-possible/17978/5 "2026-10-07T09:37:49Z")

</div>


