We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42377
    • 14 Posts
    I've read elsewhere that in order to style the SimpleSearch form I need to make changes in the snippet called "tpl". I'm not sure if that was for older versions, but I'm not able to find a snippet with this name.

    I need to remove the border around the outside edge of the form, and remove the word "search:" from in front of the form.

    Any help would be greatly appreciated.

    Thanks!
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      That is not a snippet. A "tpl" is a mini-template used by a snippet to structure the snippet's output. By default, SimpleSearch uses a chunk named SearchForm. Do not edit this chunk! If you upgrade SimpleSearch in the future, the default SearchForm chunk will be overwritten.

      The best way would be to simply duplicate the default chunk with a different name, and make sure it works the same when you specify your new chunk in the &tpl property. Then start editing your chunk as you wish.

      http://rtfm.modx.com/display/ADDON/SimpleSearch.SimpleSearchForm

      You can use CSS to style the form in any way you like.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 42377
        • 14 Posts
        Thank you for your reply. I don't have a SearchForm chunk. I only have Snippets. They are called "SimpleSearch", "SimpleSearchForm", and "SimpleSearchIndexAll". The SimpleSearchForm snippet doesn't seem to have any elements in it that can be styled.

        I appreciate the feedback though. Still trying to figure out this one.

        Quote from: sottwell at Jan 30, 2013, 03:01 PM
        That is not a snippet. A "tpl" is a mini-template used by a snippet to structure the snippet's output. By default, SimpleSearch uses a chunk named SearchForm. Do not edit this chunk! If you upgrade SimpleSearch in the future, the default SearchForm chunk will be overwritten.

        The best way would be to simply duplicate the default chunk with a different name, and make sure it works the same when you specify your new chunk in the &tpl property. Then start editing your chunk as you wish.

        http://rtfm.modx.com/display/ADDON/SimpleSearch.SimpleSearchForm

        You can use CSS to style the form in any way you like.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          That was my mistake. The default tpl is in core/components/simplesearch/elements/chunks/searchform.chunk.tpl

          http://rtfm.modx.com/display/ADDON/SimpleSearch.SimpleSearchForm#SimpleSearch.SimpleSearchForm-Examples

          Make a new chunk, name it whatever you like (MySearchForm in the example), and copy the sample's SimpleSearchForm tpl into the chunk. Specify your chunk's name in the &tpl=`...` property. Edit the chunk to show whatever HTML structure you want, and style it with your .css file.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org