• Resolved amandau

    (@amandau)


    Hello,

    I got two questions. Is it possible to search for the store name? As it is now, I can only search for city and address.

    Also, is there a way to add a reset button next to the search field and button, and not just keep it inside the map? I am using a custom template for my map.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter amandau

    (@amandau)

    Any assistance would be appreciated, thanks.

    Hello, you can add the reset button (also the location button) by pasting
    $this->get_map_controls()
    into your custom template in front of the search field

    With the default template it will look like this:

    $output .= '<div id="wpsl-wrap">' . "\r\n";
    $output .= "\t" . '<div class="wpsl-search wpsl-clearfix ' . $this->get_css_classes() . '">' . "\r\n";
    $output .= "\t\t" . '<div>.$this->get_map_controls().'</div>' . "\r\n";
    $output .= "\t\t" . '<div id="wpsl-search-wrap">' . "\r\n";
    $output .= "\t\t\t" . '<form autocomplete="off">' . "\r\n";
    $output .= "\t\t\t" . '<div class="wpsl-input">' . "\r\n";
    $output .= "\t\t\t\t" . '<div><label for="wpsl-search-input">' . esc_html( $wpsl->i18n->get_translation( 'search_label', __( 'Your location', 'wpsl' ) ) ) . '</label></div>' . "\r\n";
    $output .= "\t\t\t\t" . '<input id="wpsl-search-input" type="text" value="' . apply_filters( 'wpsl_search_input', '' ) . '" name="wpsl-search-input" placeholder="" aria-required="true" />' . "\r\n";
    $output .= "\t\t\t" . '</div>' . "\r\n";
    • This reply was modified 8 years, 10 months ago by Oliver.
    • This reply was modified 8 years, 10 months ago by Oliver.
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Search on name / reset button’ is closed to new replies.