1

Topic: Search all

Hi Vlad

I upgraded my website to version 2.0 and tried to add the “search all” option the search.php  page like this but it doesn’t work.

I tried replacing this script:

<!-- ELSEIF field_type = "combo" -->
<select class="inputCombo" name="{field_label}">
{pdropdownlist:field_items,field_value}
</select>

With this:

<!-- ELSEIF field_type = "combo" -->
<!-- IF label = "country" -->
<select class="inputCombo" name="{field_label}">
<option value="">Alle</option>
{pdropdownlist:field_items,field_value}
</select>
<!-- ELSE -->
<select class="inputCombo" name="{field_label}">
{pdropdownlist:field_items,field_value}
</select>
<!-- ENDIF -->

Can you help me out? It worked with the old version. Thanks.

2

Re: Search all

I am not a coder so what i am going to say will probably be irrelevant i noticed that all is spelled incorrectly but like i said i dont know if its even a relevant problem or not
as that you may be from a different country and may spell it differently than I do
<option value="">Alle</option>

Last edited by jamesd116 (2007-01-14 07:59:55)

3

Re: Search all

"Alle" is German for "All" Still, that's not the problem. It's not working.

4

Re: Search all

Should use "field_label" instead of "label" on the second line:

<!-- ELSEIF field_type = "combo" -->
  <!-- IF field_label = "country" -->
    <select class="inputCombo" name="{field_label}">
      <option value="">Alle</option>
      {pdropdownlist:field_items,field_value}
    </select>
  <!-- ELSE -->
    <select class="inputCombo" name="{field_label}">
      {pdropdownlist:field_items,field_value}
    </select>
  <!-- ENDIF -->

More tags available here.

5

Re: Search all

As in "all states"? Replace "country" with the label you gave to your states field in the code above.

6

Re: Search all

how to make country default?