We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38948
    • 15 Posts
    Hello,

    i want to fill the input field with a default word. Before the first search the input field is empty.

    Martin
      • 22835
      • 54 Posts
      pauloneill79 Reply #2, 12 years ago
      it's on the simplesearch documentation (hidden away on this page http://rtfm.modx.com/display/ADDON/SimpleSearch.SimpleSearchForm


      +searchValue:default=`Search the site`


      <form id="my_id" action="[[~[[+landing:default=`[[*id]]`]]]]" method="[[+method:default=`get`]]">
          <input id="searchField" class="my_class" type="text" name="my_custom_search_field" value="[[+searchValue:default=`Search the site`]]"/>
          <input id="searchIcon" class="utilityButton" type="image" alt="Search" src="/assets/templates/my/images/searchButton.png">
          <input type="hidden" name="id" value="[[+landing:default=[[*id]]]]" />
      </form>
        • 38948
        • 15 Posts
        Great - thank you!