How to Remove Search Button?


5 コメント

  • Andreas Schuster
    Community Moderator

    Hi Kyle B,

    Are you able to share the public URL to your Help Center? This would help a lot.

  • Kyle B

    Can I do this without this theme being published? 

  • Andreas Schuster
    Community Moderator

    I think preview URLs are publicly available.

    Edit: Either way, I think you need to use CSS or JS to simply hide that <input> element.

  • Kyle B

    I found the answer. Here is what my code looks like now:

    //dynamic placeholder in searchbar
    var gtext = $("span#search_placeholder_text").data('value');
    $('#query').attr('placeholder', gtext);

    <section class="sub-nav-wrapper">
    <div class="container">
    <nav class="sub-nav">
    {{search submit=false instant=true class='search'}}



    which makes it look like this:


    I also changed it into an instant search so if you type something, you get a list of suggestions without having to hit enter. Much better. 

  • Nicole S.
    Zendesk Community Team

    Glad you got things working, Kyle! Thanks for coming back and sharing the answer. :)



Powered by Zendesk