How to pre-fill a Geographic Places Search Box?

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:

Pre-fill this 2:

  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”.

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

You can use formatted_address. But I think place_id would work too. Please test it and let me know.

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

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

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

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