Prefill Search Box with Keywords

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • matt3830
    Member
    • Aug 2006
    • 62
    • 3.6.x

    Prefill Search Box with Keywords

    I have a search box in my header. I want to prefill it with the query from a previous search. What do I need to use as the value in the search box form? This is what I've got so far:

    value="<if condition="$show['results']">
    $displayWords
    <else />
    Enter Your Search Here
    </if>"
  • feldon23
    Senior Member
    • Nov 2001
    • 11291
    • 3.7.x

    #2
    You're going to have to hack up the code pretty good if you want to save keywords entered in a previous search in the Advanced or Quick Search pages and keep that data around until it appears in a Search box in your header.

    Maybe I am misunderstanding how long you want this information stored for?

    Comment

    • matt3830
      Member
      • Aug 2006
      • 62
      • 3.6.x

      #3
      I don't really want it stored anywhere. When a member does a search it takes them to the search results page. On that page it shows the keywords that they searched for. I want to put those keywords into a search box (that is located in the header area).

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...
      😀
      😂
      🥰
      😘
      🤢
      😎
      😞
      😡
      👍
      👎