Forum Discussion
qingliu
12 years agoContributor
Thanks Adam, it works. However, do you know whether it is possible to hide only the selected drop down menu? like i have 4 options, board, community, category, TKB and users. I would like to hide the TKB selection option.
Do u think it is a way to do that without using javascript to find element and hide?
Cheers,
Qing
Do u think it is a way to do that without using javascript to find element and hide?
Cheers,
Qing
AdamA
12 years agoKhoros Oracle
Qing,
Sorry, I missed your initial question. There is currently not a config/setting/parameter that will allow you to just hide the TKB select option item, aside from disabling the TKB feature. Currently I think JavaScript is your only option.
Sorry, I missed your initial question. There is currently not a config/setting/parameter that will allow you to just hide the TKB select option item, aside from disabling the TKB feature. Currently I think JavaScript is your only option.
- qingliu12 years agoContributor
thank you, i will try it and post the results
- qinglau12 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