Hi guys, so I have a smart search box up in my master page, and as mentioned in the documentations, when submitting the search query the website will redirect to a page that contains a smart search results web part. My problem is that I want to keep the values inside the smart search box even after redirection. Is there a way to preserve the data (or the string)inside a textbox (within a master page) from one page to another?
hassan, in the "watermark text" property of the search box web part, click on the black triangle and enter this macro in the edit value box.
{% QueryString.searchtext != null ? QueryString.searchtext : "Search" |(identity)GlobalAdministrator%}
Depending on how your search works, you can use some JavaScript to set the value of the text box to the QueryString value. On the Dancing Goat site, the key is searchtext for example.
searchtext
hello, I am sorry your answer was not really helpful since I am new to kentico and javascript both so I need a little more explanation and examples. also please note that I dont have the dancing goat site so I dont have access to its code. If you may add more explanations a would be grateful.
@rui-wang exactly what i needed. thank you.
Please, sign in to be able to submit a new answer.