Hi, I'm using the webform module to create webforms, but rather than simply linking to the webform page, I want to take the form that I've created with this module and place it into other pages, such as the main page for book pages. Is there a way that I can access the code so that I can place it into one of these pages?

Comments

merlinofchaos’s picture

The only way I can think of off hand would be to insert a little PHP into the book page that did something like this:

  $node = db_fetch_object(db_rewrite_sql("SQL query the node; probably something like: SELECT * FROM {node} n WHERE n.nid=thenumberofthenodewiththeform"));
  print theme('node', $node, $page=true);

That's just off the top of my head, so may not be quite accurate, but it's a place to start. The thing is, you'll get the entire node, not just the form part of it. Though there might be a way to extract that from the node information. Or maybe the entire node will be what you want. I haven't actually used the webforms module so I'm only guessing at what it does.

-- Merlin

[Read my writing: ehalseymiles.com]
[Read my Coding blog: Angry Donuts]