Drupal - How To Create A Double Contact Form Page

Just a quick tip here:
If you want to create a double contact form page, like my own contact page, it's easy enough to do:

  • Step 1
    Use the webform module to create the two contact forms. Webform allows you a great degree of customisation over forms and, crucially, it creates its webforms as nodes. This will be important for step two.
  • Step 2
    Now we have the webform contact forms as nodes we can use the panels module and position both of our nodes on the same overall page. To do so, create a new panel (admin/build/panels/add) and choose the default two column layout. Then just place the first webform node in the left hand side and the second webform node in the right hand side.

--------------------------
UPDATE:
This tip was done using Panels v1.
If you are using Panels v2 please check out comment #3 below as it's a little different.

6 comments

1
Jonathan BloomJuly 11th 2008 @ 04:51AM

I'm having trouble with this! I'm using webform and panels 2 and I can't seem to select webform nodes as content in my panels. I'm using Drupal 5 and the latest of both modules.

2
LaurenceJuly 11th 2008 @ 12:11PM

Hi Jonathan,
I should have mentioned that I was using Panels 5.x-1.2 not 2, so I'll check this out with Panels 2 and post back shortly.

3
LaurenceJuly 11th 2008 @ 01:05PM

UPDATE:

OK, I've checked this out using panels 5.x-2.0-beta5, webform 5.x-1.2 and Drupal 5.8 and it does work fine.

In order to add the webform nodes to the panel:

  • navigate to the panel's 'Content' tab
  • click the 'add to pane' button (plus sign) on one of the panel's panes, which will open the 'Add Content' window
  • in the 'Add Content' window go to the 'Content' section and click on 'Node Content'. This will bring up the 'Configure Node Content' window where you can search for the node you want to add with either its name or node id.

Jonathan, my guess is that you aren't able to see the 'Node Content' option under 'Content' in the 'Add Content' window - correct? If so, you will need to also enable Panels 2's 'Legacy node panes' module from your site's main admin modules section (admin/build/modules).

Don't worry that it says it is 'deprecated'. Looking at this recent issue it seems that the description is now being re-worded due to causing confusion!

Hope that helps you out.

4
Jonathan BloomJuly 11th 2008 @ 04:02PM

Thanks, this fixed my problem! Now webform is even more useful!

5
JurgenJuly 14th 2008 @ 04:47PM

Hi,

I am also using Panels in combo with Webform module. It all works fine until I submit my webform and then it gets out of the panel and so it also gets out of my layout, my css won't match anymore.

link: www.kscandy.be/nl/contact

Any tips?

Thank you in advance.
Jurgen

6
The WebmasterJuly 16th 2008 @ 08:39PM

Looks Great
let me try it
i will come back if it doesn't work
But thanks for this anyways.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options