Hi Mike (and Shane)
I’m sorry, but I don’t think I understand :red:
Well, I added the code to the page for the banners (not the search or result page):
<div>
{exp:channel:entries
channel="banner"
status="open|riks"
dynamic="no"
}
<a href="http://{banner_lank}">{banner_bild}</a>
{exp:search:simple_form channel="min_skola"} // this is the channel for the search
<input name="keywords" id="keywords" value="{banner_kommun}" /> // holds the same value as a custom filed in channel min_skola
<input type="image" name="submit" id="submit" src="{banner_bild}" />
{/exp:search:simple_form}
{/exp:channel:entries}
</div>
Clicking the banner gives “No result”. Maybe I did not explained it right :red: So a recapitulation is like this:
#1. You do a search on this page: http://skola.studioalice.se/min_skola (search channel is min_skola)
{exp:search:simple_form channel="min_skola" status="open" search_in="everywhere" where="exact" result_page="min_skola/resultat"}
<select name="keywords">
<option value="" selected="selected">- Välj kommun -</option>
{exp:query sql="SELECT DISTINCT `field_id_35` AS skola_kommun FROM `exp_channel_data` WHERE `field_id_35`<>'' ORDER BY `field_id_35`"}
<option value="{skola_kommun}">{skola_kommun}</option>
{/exp:query}
</select>
<input type="submit" value="Sök" class="small round green button">
<input type="hidden" name="orderby" value="title" />
<input type="hidden" name="sort_order" value="asc" />
{/exp:search:simple_form}
#2. Banners are added through admin and with a custom field for the link (to the result page). Banners also have it’s own channel “banners”
Regards, Magnus