0
votes

We want to create a page that shows two specific nodes.

The first node will be localized content (an article node in the user's language). There will be at least 5 different language versions of that page.

The second node will be a Webform node that the user can submit to "sign" the document. It will be language neutral.

Originally I figured that I could have one Webform node and then translate it into the appropriate languages. But what I discovered was that the "translated" version of the Webform node was, in fact, a completely new node--which means a completely new webform. This makes sense if you think about how Drupal handles multilingual content--each translation is a separate node.

But in the case of our webform, we don't want to split the submissions into 10+ different webform submission sets. Everybody who "signs" has their signatures placed into the same "bin" of data.

I can think of two possible solutions:

  1. Create a page that will display two nodes: the localized version of an "article" node (selected depending on the user's language selection), and the webform.

  2. Create multiple Webform nodes (one per language), and then create a MySQL view that merges all the user submissions into a single set of records. This would allow us to extract our data without a great deal of headache.

I'm not sure if 2 is possible. I'm assuming that I'll have to go with 1. But, so far my efforts to accomplish this have also been fruitless! How can I do this?

-Josh

1
I'd go for a simple solution like embedding the webform using Webform Block module and configuring correct visibility settings. - AKS
I thought of setting up a block that appears only on specific nodes, but that seemed somewhat cumbersome and I was hoping there was a better way? If we go this route, then we could wind up with a ton of blocks that are only intended to appear alongside one piece of content. This will give us a cluttered "Blocks Administration" page. - Josh

1 Answers

0
votes

I think 1 is much easy and possible solution. You can create webform node and make body field as php code (for that you need to enable php filter). And put in body follow lines:

<?php
$nid = NODE_ID;
$node = node_load($nid); 
$node_view = node_view($node, 'full'); 
print drupal_render($node_view);
?>

Just replace NODE_ID with nid of multilanguage node.