# How to pre-fill a Geographic Places Search Box?

**URL:** <https://forum.bubble.io/t/how-to-pre-fill-a-geographic-places-search-box/371260>\
**Category:** Questions\
**Created:** [May 30, 2025, 2:58pm UTC](https://forum.bubble.io/t/how-to-pre-fill-a-geographic-places-search-box/371260 "2025-05-30T14:58:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sam.olsson](https://avatars.discourse-cdn.com/v4/letter/s/e480ec/32.png) [@sam.olsson](https://forum.bubble.io/u/sam.olsson)\
**Post date:** [May 30, 2025, 2:58pm UTC](https://forum.bubble.io/t/how-to-pre-fill-a-geographic-places-search-box/371260/1 "2025-05-30T14:58:09Z")

</div>

Hello Community,

Explaining the entire use case might make this topic very big.  
So, I will try to ask a simplified version of a use case that I am having trouble figuring out.

I have a Search Box, whose choices are set to Geographic Places.

My use case is that, based on a selected location on a different page (with a similar implementation), I need to pre-fill the search box on the current page.

For Example:  
Page 1) The User selects `Hotel A` and clicks on submit.

I can get as much info as needed and redirect the user to a second page(all details of the selected location added to URL params)

Page 2: Now I want to use this data from the URL to pre-fill the second Search Box with `Hotel A`.

I understand the concept of custom states and initial value, etc.

What I am struggling with is how to pass the data to the state.

There is no datatype for `Geographic Address` when I try to create a new thing, and I am not able to auto-fill the search box in this case.

Please let me know if I missed any details.  
Any help is appreciated.

Based on 1:

 ![Screenshot 2025-05-30 at 8.32.35 PM](https://us1.discourse-cdn.com/bubble/original/3X/7/3/734168b8c0f4db614d1d021d7d90f122000ca192.png)

Pre-fill this 2:

 ![Screenshot 2025-05-30 at 8.33.21 PM](https://us1.discourse-cdn.com/bubble/original/3X/b/4/b4ed65fbd959ee8cd6f60346fc1348cdc4e671cc.png)

---

<div class="post-metadata">

**Author:** ![douglas.epr](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/douglas.epr/32/246770_2.png) [@douglas.epr](https://forum.bubble.io/u/douglas.epr)\
**Post date:** [May 30, 2025, 3:19pm UTC](https://forum.bubble.io/t/how-to-pre-fill-a-geographic-places-search-box/371260/2 "2025-05-30T15:19:42Z")

</div>

1. You insert on default value “Get data from page URL”.
2. If the URL parameter passed from previous page is called “location” for example, you type it on the expression input and Type you can choose “geographic address”.

 ![Captura de tela 2025-05-30 121713](https://us1.discourse-cdn.com/bubble/original/3X/2/1/2117ff6a7e1e18eda9a6c5f7d6bbdc2bd8f2120d.png)

---

<div class="post-metadata">

**Author:** ![sam.olsson](https://avatars.discourse-cdn.com/v4/letter/s/e480ec/32.png) [@sam.olsson](https://forum.bubble.io/u/sam.olsson)\
**Post date:** [May 30, 2025, 4:26pm UTC](https://forum.bubble.io/t/how-to-pre-fill-a-geographic-places-search-box/371260/3 "2025-05-30T16:26:21Z")

</div>

And what data needs to be passed in the location parameter?  
place\_id, formatted\_address, or something else since the type has to `Geographic Address`

---

<div class="post-metadata">

**Author:** ![douglas.epr](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/douglas.epr/32/246770_2.png) [@douglas.epr](https://forum.bubble.io/u/douglas.epr)\
**Post date:** [May 30, 2025, 4:45pm UTC](https://forum.bubble.io/t/how-to-pre-fill-a-geographic-places-search-box/371260/4 "2025-05-30T16:45:21Z")

</div>

You can use formatted\_address. But I think place\_id would work too. Please test it and let me know.

 ![Captura de tela 2025-05-30 134325](https://us1.discourse-cdn.com/bubble/original/3X/4/1/412f4caffdcaf3395d55502b3a7a9f9c872d5b47.png)

---

<div class="post-metadata">

**Author:** ![sam.olsson](https://avatars.discourse-cdn.com/v4/letter/s/e480ec/32.png) [@sam.olsson](https://forum.bubble.io/u/sam.olsson)\
**Post date:** [May 30, 2025, 11:19pm UTC](https://forum.bubble.io/t/how-to-pre-fill-a-geographic-places-search-box/371260/5 "2025-05-30T23:19:21Z")

</div>

Hi @douglas.epr I tried both and it does not work.

Passing in `hotel_name` or `formatted_address` gives an unexpected result.  
Passing in `place_id` keeps it empty.

I get the sense that we need to create a `thing with geographic address type` and then set that, but I’m unsure how to do so  
.  
 ![Screenshot 2025-05-31 at 4.44.57 AM](https://us1.discourse-cdn.com/bubble/optimized/3X/3/0/30f845966dbca71983a3cc013ea10cc1bd4c7938_2_345x28.png)

 ![Screenshot 2025-05-31 at 4.45.12 AM](https://us1.discourse-cdn.com/bubble/original/3X/1/f/1f0e6b363ecb07ed6c2875238e4bb644eab88153.png)

 ![Screenshot 2025-05-31 at 4.45.33 AM](https://us1.discourse-cdn.com/bubble/original/3X/4/a/4a5ae4bb2002c5d81ae32c47272838d77483729a.png)

How I expect it to work is to auto fill with all the correct google place params.

---

<div class="post-metadata">

**Author:** ![tobixzybolumole](https://avatars.discourse-cdn.com/v4/letter/t/4bbf92/32.png) [@tobixzybolumole](https://forum.bubble.io/u/tobixzybolumole)\
**Post date:** [May 31, 2025, 12:03am UTC](https://forum.bubble.io/t/how-to-pre-fill-a-geographic-places-search-box/371260/6 "2025-05-31T00:03:38Z")

</div>

The value of the previous searchbox which was saved in your database is what you need to send to the url and retrieve it as a default value

---

<div class="post-metadata">

**Author:** ![douglas.epr](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/douglas.epr/32/246770_2.png) [@douglas.epr](https://forum.bubble.io/u/douglas.epr)\
**Post date:** [May 31, 2025, 2:25am UTC](https://forum.bubble.io/t/how-to-pre-fill-a-geographic-places-search-box/371260/7 "2025-05-31T02:25:18Z")

</div>

Try to change “Get data from page URL” Type from “geographic address” to “text”. I think it can work.

---

<div class="post-metadata">

**Author:** ![sam.olsson](https://avatars.discourse-cdn.com/v4/letter/s/e480ec/32.png) [@sam.olsson](https://forum.bubble.io/u/sam.olsson)\
**Post date:** [August 9, 2025, 6:49pm UTC](https://forum.bubble.io/t/how-to-pre-fill-a-geographic-places-search-box/371260/8 "2025-08-09T18:49:00Z")

</div>

This requirement changed, so could not confirm the working of the suggested changes.
