Cannot search by name only

Home Forums Store Locator Plus Cannot search by name only

This topic contains 2 replies, has 2 voices, and was last updated by  Cici 1 year, 9 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #27070

    Joanna
    Participant

    Hello SLP Support,

    I am having the same problem that is detailed in Name Search Issues and How Immediate Mode Affects Results.

    If you visit our surgeon locator, you will see what I mean.

    There are over 400 doctors in the database. All of them have a certain rank, and the idea is to show higher ranked doctors first when a user searches for results near their address. The default radius is set to 50 miles from user’s location.

    However, if you try to just search for a doctor name anywhere in the united states (in other words, no address is specified in the input bar), the search results turn up nothing. There are no doctors at all within 50 miles of the center of the US.

    What we need is a way to turn off the radius parameters when a user searches for a doctor’s name anywhere in the united states. I have tried selecting the “Radius Behavior: Use Only When Address Is Entered” but I see no change.

    If I increase the default radius to 10,000 miles I get results, but that defeats the purpose of our surgeon locator since we want to limit the results it shows based on user’s location and doctor rank.

    Please let me know if there is a solution to my problem.

    #27163

    Joanna
    Participant

    After digging into some source code, I discovered that the ‘Use Only When Address Is Entered’ radius behavior was indeed working properly. My results were displaying incorrectly because I had  placeholder text set in my address bar. The hidden ignore_radius input type was setting its value to 0 instead of 1 because it was reading the placeholder value as actual text inside the text field.

    Removing the placeholder value has solved my issue for now, but in the future I may have a need to use placeholder text again. Is there anything I can do to fix this bug, so placeholder text is not read as actual text?

    Aside from this little quirk, our surgeon locator is running smoothly and we are very happy we found Store Locator Plus.

    #27576

    Cici
    Keymaster

    Hi Joanna: My understanding is that placeholder text is an attribute distinct from the input text. If its getting turned passed as input text, this may be a problem with the browser. A placeholder is not the same thing as a default input value.

    <input type=“text” name=“inputname” placeholder=“for display only” value=”default value”>

    In testing on my site, I found the paceholder text worked as I expected.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.