How to populate search form with search term in View / Panels / Page? I've using Views and Page Manager to create a custom search results page. You can see it here:

http://quotefail.com/search/node/world

The page is being generated by Page Manager. I've got a Search Form in the top panel, but it starts empty. I'd like it to be pre-filled with the search term that was used to generate this page. 

How can I prepopulate the search form with that search term?

Here is my page config:



Here is my Search View in the center panel:
Looks like from that link that the search form is the search block form, so you can do this as a theme form alter (you could also make a custom module in a similar fashion with form alters but this should serve your needs).  This goes in your template.php for your theme:

function YOURTHEMENAME_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  switch ($form_id) {
    case 'search_block_form':
      //checking if arg(2) exists so it doesn't try to do this if some visits the search page straight away
      if(arg(2)){ 
        $form['search_block_form']['#default_value'] = arg(2);
      }
      break; 
  }
}