# Update FormID based on dropdown select

**URL:** <https://community.hubspot.com/t/update-formid-based-on-dropdown-select/71596>\
**Category:** APIs & Integrations\
**Created:** [December 20, 2022, 4:18pm UTC](https://community.hubspot.com/t/update-formid-based-on-dropdown-select/71596 "2022-12-20T16:18:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MYoung83](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@MYoung83](https://community.hubspot.com/u/MYoung83)\
**Post date:** [December 20, 2022, 4:18pm UTC](https://community.hubspot.com/t/update-formid-based-on-dropdown-select/71596/1 "2022-12-20T16:18:06Z")

</div>

Hello,

I’d like to have a form with a dropdown selection. When the selection is changed, the FormID is updated. Is that possible?

This is for an event that has multiple locations, and each one requires its own unique form/formID.

So user selects the location (from downdown), which then updates/refreshes(??) the formID so the information gets sent to the correct form.

Possible?

Thanks!

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [December 21, 2022, 6:27pm UTC](https://community.hubspot.com/t/update-formid-based-on-dropdown-select/71596/2 "2022-12-21T18:27:19Z")

</div>

Hey, @MYoung83 👋 I don’t see a documentation way to accomplish this out of the box. Maybe one of our community wizards has an idea — @JBeatty @Anton @MatthiasWeber, do you have any suggestions for @MYoung83?

Best,

Jaycee

---

<div class="post-metadata">

**Author:** ![MatthiasWeber](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/matthiasweber/32/27498_2.png) [@MatthiasWeber](https://community.hubspot.com/u/MatthiasWeber)\
**Post date:** [December 21, 2022, 8:13pm UTC](https://community.hubspot.com/t/update-formid-based-on-dropdown-select/71596/3 "2022-12-21T20:13:44Z")

</div>

Hey [@Jaycee\_Lewis](https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074) if you ask a wizard, we need a magic spell - right? In this case i think we need: JavaScript ;-). In fact it is more a magic potion:

- attach to the change event of the dropdown box (there are different ways - use jQuery if you can)

- if the dropdown changes: read the selected option

- find FormID in the dom (jQuery can help here again)

- change with DOM-manipluation your FormID (What is the DOM? Answer here: [https://www.w3schools.com/whatis/whatis\_htmldom.asp)](https://www.w3schools.com/whatis/whatis_htmldom.asp)

[@Jaycee\_Lewis](https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074)

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [December 21, 2022, 8:48pm UTC](https://community.hubspot.com/t/update-formid-based-on-dropdown-select/71596/4 "2022-12-21T20:48:38Z")

</div>

Hey, @MatthiasWeber 👋 Thank you very, very much!

Best,

Jaycee
