This topic is locked

Convert Drop Down to Hidden Field

10/14/2006 10:25:03 PM
PHPRunner General questions
R
randybass author

On the standard search fields in PHPRunner, I would like to convert two of them to hidden fields. I have tried several things with no success. Here is what I have tried that does not work:
<input type="Hidden" id=ctlSearchField value="F1" {$search_F1}>
This is what works:
<SELECT id=ctlSearchField><OPTION value=F1 {$search_F1}>PROGRAM</OPTION></SELECT>&nbsp;
<SELECT id=ctlSearchOption><OPTION value=Equals

{$search_equals_option_selected}>Equals</OPTION>

</SELECT> &nbsp;
Thanks!

J
Jane 10/16/2006

Hi,
you can do the following:

  1. remove whole <SELECT id=ctlSearchField ... \SELECT> code.
  2. then find <FORM name=frmSearch at the top of this page, locate following line:
    <input type="Hidden" name="SearchField" value="">



and replace it with this one:

<input type="Hidden" name="SearchField" value="F1">

samsp 10/20/2006

Hi,

you can do the following:

  1. remove whole <SELECT id=ctlSearchField ... \SELECT> code.
  2. then find <FORM name=frmSearch at the top of this page, locate following line:
    and replace it with this one:


hi jane,
i have tried that, but it did not run.
greetings from sunny spain
sam

samsp 10/20/2006

ok, here is the sulution:

  1. remove whole <SELECT id=ctlSearchField ... \SELECT> code.

  2. and replace it with this one:

    <input type="Hidden" id="ctlSearchOption" value="Contains" {$search_contains_option_selected}>


then open include\ jsfunctions.js

and replace

frmSearch.SearchOption.value = document.getElementById('ctlSearchOption').options[document.getElementById('ctlSearchOption').selectedIndex].value;
with

frmSearch.SearchOption.value = document.getElementById('ctlSearchOption').value;


thats it.
greetings from sunny spain
sam

J
Jane 10/23/2006

Sam,
I'm glad you were able to resolve it!