1

I'm using drupal 7 and I have a content type "service".

And I have a enquiry page, built with webform with following fields:

  • Name
  • Email
  • Service
  • Message

In each service page, I would like to have a tab for page content, a tab "Enquiry", with the enquiry webform in the tab.

For service field, I would like it to show page title as default.

Is there any way I can do it?

2 Answers 2

2

There are two ways to do that :

  1. Write a custom module and create a menu path "node/%node/enquiry" and return your enquiry form programmatically. In hook_menu you can set type = MENU_LOCAL_TASK that will display the path as tab.

  2. You can create a view page that displays webform and select the menu Menu tab under menu setting. Path of page should be node/%/enquiry, so that It will create a tab on node/% page. Screenshot for the second method :

enter image description here

enter image description here

0
0

Try Quick Tabs

The Quick Tabs module allows you to create blocks of tabbed content, specifically views, blocks, nodes* and other quicktabs*. You can create a block on your site containing multiple tabs with corresponding content.

Try out a demonstration

4
  • But I want to have my page content as first tab, and "Enquiry" as second tab. Quick tabs doesn't allow me to put my page content on tab?
    – vences
    Commented Jun 10, 2015 at 9:15
  • Yes it will allow you do so.
    – niksmac
    Commented Jun 10, 2015 at 9:21
  • In one quick tab, I add webform tab and content tab (with node ID). But this is applicable to one page only? And for another page, I have to add another quick tab instance with different node ID? Or is there a setting for quick tab to automatically show different content in different page?
    – vences
    Commented Jun 10, 2015 at 9:27
  • Workaround will be adding the Quick Tabs as a block and enable it on every page.
    – niksmac
    Commented Jun 10, 2015 at 9:34

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.