This topic is locked

default value from search result

11/22/2010 5:48:07 PM
PHPRunner General questions
F
Frozen Fire author

I have a page and a connected search page. How to make field's default value = search result? So that if we have search something, and we need to add new row, we don't need to re-select suggested valued from lookup table. From address bar, the result search is in variable value11, can we take this variable value as default value for that field?
Thanks!

Sergey Kornilov admin 11/23/2010

Here is how you can do this.

  1. BeforeProcessList event

$_SESSION["SearchValue"]=$_REQUEST["value11"];


2. Set $_SESSION["SearchValue"] as a default value of the field in question.