Forum Discussion
qingliu
Contributor
thank you, i will try it and post the results
qinglau
12 years agoMentor
Hi Adam,
Here is my solution , i build a custom componment and nested the common search form widget in here and use JavaScript to select first option in the drop down menu, the CSS is applied to hide drop down menu.
<div id="kpn_main_search"> <div id="kpn_main_search_title"><span>Een vraag stellen</span></div> <a class="lia-search-page-link" href="/t5/forums/searchpage/tab/message">${text.format("custom.page.search.advancedsearchlink")}</a> <@component id="common.widget.search-form" /> </div> <!--Search script--> <@liaAddScript> $( document ).ready(function() { var search = $('#searchGranularity option:first').val($("#target option:first").val()); }); </@liaAddScript>
i have another question, is there a way to force the search type, for instance, i want to the common widget search form only searches the Forum not blog. Is it possible?
Thank you
common.widget.search-form