I've been working on this for a couple days and know it's something small but for the life of me I can't figure it out. (I've been using Daniweb for a long time, but just joined because everyone seems so helpful. :) ) Maybe someone can help me too.
Here's my code:
{*
* $Revision: 1.5 $
* If you want to customize this file, do not edit it directly since future upgrades
* may overwrite it. Instead, copy it into a new directory called "local" and edit that
* version. Gallery will look for that file first and use it if it exists.
*}
{g->callback type="search.getVariables"}
{g->addToTrailer}
<script type="text/javascript">
// <![CDATA[
search_SearchBlock_init('{g->text text="Search the Gallery"}', '{g->text text="Please enter a search term."}');
// ]]>
</script>
{/g->addToTrailer}
<div class="{$class}">
<form id="search_SearchBlock" action="{g->url}" method="post" onsubmit="return search_SearchBlock_checkForm()">
<div>
{g->hiddenFormVars}
<input type="hidden" name="{g->formVar var="view"}" value="search.SearchScan"/>
<input type="hidden" name="{g->formVar var="form[formName]"}" value="search_SearchBlock"/>
<input type="text" id="searchCriteria" size="18"
name="{g->formVar var="form[searchCriteria]"}"
value="{g->text text="Search"}"
onfocus="search_SearchBlock_focus()"
onblur="search_SearchBlock_blur()"
class="textbox"/>
<input type="hidden" name="{g->formVar var="form[useDefaultSettings]"}" value="1" />
{if $theme.item.parentId}<input type="hidden" name="{g->formVar var="form[albumId]"}" value="{if $theme.item.canContainChildren}{$theme.item.id}{else}{$theme.item.parentId}{/if}" />{/if}
{if $block.search.showSearchIcon}<input type="image" style="vertical-align: middle;" name="{g->formVar var="form[searchGallery]"}" alt="{g->text text="Search gallery"}" title="{g->text text="Search gallery"}" src="{if empty($theme.params.colorpack)}{g->url href="modules/search/images/search.gif"}{else}{g->url href='modules/colorpack/packs/'}{$theme.params.colorpack}/images/search.gif{/if}">{/if}
{if $block.search.showSearchGalleryIcon}<input type="image" style="vertical-align: middle;" name="{g->formVar var="form[searchGallery]"}" alt="{g->text text="Search gallery"}" title="{g->text text="Search gallery"}" src="{if empty($theme.params.colorpack)}{g->url href="modules/search/images/searchGallery.gif"}{else}{g->url href='modules/colorpack/packs/'}{$theme.params.colorpack}/images/searchGallery.gif{/if}">{/if}
{if $block.search.showSearchAlbumIcon && $theme.item.parentId}<input type="image" style="vertical-align: middle;" name="{g->formVar var="form[searchAlbum]"}" alt="{g->text text="Search album"}" title="{g->text text="Search album"}" src="{if empty($theme.params.colorpack)}{g->url href="modules/search/images/searchAlbum.gif"}{else}{g->url href='modules/colorpack/packs/'}{$theme.params.colorpack}/images/searchAlbum.gif{/if}">{/if}
</div>
{if $block.search.showCheckbox && $theme.item.parentId}
<div>
<input type="checkbox" style="vertical-align: middle;" name="{g->formVar var="form[searchAlbum]"}" {if $block.search.defaultCheckboxToOn}checked{/if}/>{if $block.search.checkboxText}{$block.search.checkboxText}{else}{g->text text="Search only in this album"}{/if}
</div>
{/if}
{if $block.search.showAdvancedLink}
<div>
<a href="{g->url arg1="view=search.SearchScan" arg2="form[useDefaultSettings]=1"
arg3="return=1"}"
class="{g->linkId view="search.SearchScan"} advanced">{g->text text="Advanced Search"}</a>
</div>
{/if}
Friends
<select name="g2_form[searchCriteria][]">
<option value="">« No Value »</option>
<option>Dave</option>
<option>Beth</option>
<option>Kyle</option></select>
<br />
Work
<select name="g2_form[searchCriteria][]">
<option value="">« No Value »</option>
<option>Factory</option>
<option>Fast Food</option>
<option>Waiter</option>
<option>Pizza Hut</option></select>
<br />
<input type="submit" id="searchCriteria" class="inputTypeSubmit" name="Button1" value="Show"/>
</form>
</div>
What I'm trying to do is to get the values of my dropdowns to submit to a search. So, if I select Beth from the first box and then Pizza Hut from the second it will return items using both of those words or combinations of words.
Hopefully, someone can point me in the right direction because this is driving me batty!
-Gecho