0

I have used quicktabs to search my channels and profiles.I have set default tab "Channels/Videos" in quicktabs setting.When a user enters the text and selects "Profile" tab the focus automatically reverts back to "Channels/Videos".What I want want is,it should remain on the option whichever is been selected("Channels/Videos" or "profile").How can i do this? I also checked by setting the default tab as"none" in quicktabs setting but when a user search for "Channels/Videos"(or "Profile") focus on tab( which is in blue color ) disappears. How can i fix this problem?enter image description here

4
  • Is it searching the content on page refresh and what are the different parameters when you search with both. Commented Aug 5, 2014 at 7:23
  • Yes.It is searching the content on page refresh. When user clicks on search button for Channel/video tab, results are displayed on page refresh but the focus(in blue color)disappears and same happens with profile tab, which is not supposed to happen.The focus for selected tab should remain when results are displayed on page refresh.How can I do that?
    – 12345
    Commented Aug 5, 2014 at 7:39
  • What are the parametera passed in the url after question mark (?) Commented Aug 5, 2014 at 7:49
  • It is the title parameter passed after question mark.
    – 12345
    Commented Aug 5, 2014 at 8:36

2 Answers 2

0

You can alter the search form hook_for_alter using form id.

Add a hidden field name it 'mytab' whose by default value will be channel and on click of tab its value will be toggled between channel and profile.

So when we submit the form to search the content, it will look this way ?title=hello&mytab=channel

Now on in your hook_form_alter inline js code to select the default tab based on the mytab value that you can get using $_GET.

Let me know if it works for you.

-1
mymodule_quicktabs_alter(&$quicktabs) {
  $quicktabs->default_tab=2;
  return $quicktabs;
}

This works fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.