Kirby-Locator: Saving query

Hey there,
I’m checking out @sylvainjule’s kirby-locator plugin, and I’m very intrigued. The only thing bothering me is that it doesn’t save my query - so I have to use another field for this.

My client doesn’t like copy&paste, which is kind of why he hired me :smiley:
Could I fetch this somehow and hide the locator field? Any ideas?

Thank you,

// Edit: Client loves the map view, dragging the little marker around and all, playful chap :heart:

Not sure what you mean… i’ve used that field and it saved ok. You just search a place, and save the page. Not sure i get the problem you have.

When entering little book shop, my street, my town and hit ENTER, it finds everything okay. But the field doesn’t remember what I was looking for, what my search parameters were (it was little book shop, my street, my town).

1 Like

Oh i think i know what you mean, it doesnt retain the entry, but it has stamped the location into the content file, and the pin on the map should be in right place.

I guess the plugin needs a little enhancement to store the last search in english (or whatever) so it can populate the field again.

1 Like

Sounds useful to me aswell :+1:

I think the cleanest way to add this would be to provide a second field with the plugin: the current locator field + a written-address field for example, basically a text field where the locator field would copy the query when submitted, and that’d behave like an usual text field that can be edited afterwards.

Because you won’t always format your query perfectly, or if using mapbox + autocomplete you’ll probably won’t fill it completely, so storing it alongside the other values with no way to edit it seems a bit unusable.

Does it sound good?

I guess it would be enough to have a custom option for the locator field to specify another field as input field, wouldn’t it? So you don’t have to ship it with your plugin, but rather leave it up to the user / developer (unless that’s what you meant and I didn’t get it right) :slight_smile: