{{-- A single City/Locality search field wired to Google Places Autocomplete — @include this from anywhere a location can be picked (the homepage search card, the results page's "Change Location" modal). Each caller passes its own $locId (must be unique on the page) so multiple instances can coexist; everything else is optional. Params: $locId (required) unique DOM id for the text input $locPrefix hidden-field id prefix (default: $locId) $locPlaceholder default: "e.g. Vijay Nagar, Indore" $locValue pre-filled display text (e.g. the currently active locality/city on the results page) $locAutoSubmit bool — submit the enclosing
the moment a place is picked (used by the homepage field's Search flow isn't needed since it has its own Search button, but the Change Location modal wants immediate navigation) --}} @php $locPrefix = $locPrefix ?? $locId; $locPlaceholder = $locPlaceholder ?? 'e.g. Vijay Nagar, Indore'; $locValue = $locValue ?? ''; $locAutoSubmit = $locAutoSubmit ?? false; @endphp @include('partials.site._location-autocomplete-scripts') {{-- name="q" is a deliberate fallback, not dead weight: if a visitor types free text and submits WITHOUT ever picking a dropdown suggestion (no place_changed event fires, so the hidden city/locality/lat/lng fields below stay empty), the existing fuzzy location/city search (PublicPropertySearchService::search()'s `q` filter) still runs against whatever they typed, exactly like before this field existed. --}} @push('scripts') @endpush