# How to pass field values with embedded form

**URL:** <https://community.feathery.io/t/how-to-pass-field-values-with-embedded-form/872>\
**Category:** Support\
**Created:** [July 8, 2024, 7:41pm UTC](https://community.feathery.io/t/how-to-pass-field-values-with-embedded-form/872 "2024-07-08T19:41:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![adam](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@adam](https://community.feathery.io/u/adam)\
**Post date:** [July 8, 2024, 7:41pm UTC](https://community.feathery.io/t/how-to-pass-field-values-with-embedded-form/872/1 "2024-07-08T19:41:19Z")

</div>

I’m embedding my form in several places on my website, but I’d like to pass a value to each form depending on where I embed it. For instance, my form has three sections where they can see pricing, search team availability, or build a custom quote. I’d like to have a hidden field value route them to the appropriate step on form load based on which page they are on on my website.

Does that make sense?

---

<div class="post-metadata">

**Author:** ![eri](https://avatars.discourse-cdn.com/v4/letter/e/8baadc/32.png) [@eri](https://community.feathery.io/u/eri)\
**Post date:** [July 8, 2024, 8:16pm UTC](https://community.feathery.io/t/how-to-pass-field-values-with-embedded-form/872/2 "2024-07-08T20:16:50Z")

</div>

Hi Adam, this is possible as long as you have accessible identifiers in your website. The simplest would be if these several places on your website are on different pages with unique URLs, you can use those to set up conditional rules to redirect to different steps.

---

<div class="post-metadata">

**Author:** ![adam](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@adam](https://community.feathery.io/u/adam)\
**Post date:** [July 10, 2024, 10:14am UTC](https://community.feathery.io/t/how-to-pass-field-values-with-embedded-form/872/3 "2024-07-10T10:14:01Z")

</div>

So I would need to pass field values in the page url? Could I pass them in the embed code somehow instead?

---

<div class="post-metadata">

**Author:** ![eri](https://avatars.discourse-cdn.com/v4/letter/e/8baadc/32.png) [@eri](https://community.feathery.io/u/eri)\
**Post date:** [July 10, 2024, 4:00pm UTC](https://community.feathery.io/t/how-to-pass-field-values-with-embedded-form/872/4 "2024-07-10T16:00:39Z")

</div>

You can utilize goToStep function on your embed code for that: [Context API | Feathery Docs](https://docs.feathery.io/develop/context-api)

---

<div class="post-metadata">

**Author:** ![adam](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@adam](https://community.feathery.io/u/adam)\
**Post date:** [July 10, 2024, 10:09pm UTC](https://community.feathery.io/t/how-to-pass-field-values-with-embedded-form/872/5 "2024-07-10T22:09:53Z")

</div>

Can you write out an example what that JS embed code would look like?

---

<div class="post-metadata">

**Author:** ![eri](https://avatars.discourse-cdn.com/v4/letter/e/8baadc/32.png) [@eri](https://community.feathery.io/u/eri)\
**Post date:** [July 10, 2024, 11:56pm UTC](https://community.feathery.io/t/how-to-pass-field-values-with-embedded-form/872/6 "2024-07-10T23:56:37Z")

</div>

For JS, you can use initialStepId on this part of the embed code

`Feathery.renderAt('container', { formId: "ABC123", initialStepId: "Step 1" }, loginEnabled);`

Reference: [\<Form\> | Feathery Docs](https://docs.feathery.io/develop/react/api-guide/form)
