I would like to create a CCK link to a Webform that keeps stats. I have tutorial videos and I would like to add a CCK link so users can indicate whether a video was helpful or not. So, it would need to pass the node id (or node title, preferably) to the Webform so I know what video a user is referring to in the short survey.

Is this possible?

mrweaver

Comments

quicksketch’s picture

Category: feature » support

Creating a "CCK link" is not necessary. CCK allows users to enter in custom information, but since this link is basically just a pattern, the user doesn't need to enter in any information.

What you probably need is simply some theming in your node.tpl.php files, that creates a link to the Webform-based survey node. Something like this:

$webform_nid = 10;
print l(t('Rate this video'), 'node/'. $webform_nid, NULL, 'video='. $node->title);

Then in your Webform configuration, setup a textfield (or hidden field) that has the default value %get[video].

Another alternative if you're not comfortable with theming, you can use the Custom Links module to create the "Rate this video" link for you.

sunset_bill’s picture

I'm just a webform user and stumbled onto this thread while looking for something else. Anyway, I did a module called Autocreate Node Reference that, when you post a CCK content type that includes an autocreate field --e.g., one of your video nodes--clones a webform from a specified webform template node, renames the cloned webform to include the title of your containing node, and puts a node reference to the new webform in your node. (sample at http://rageagainstthecubefarm2.com/corporate-resumes/test-91) Sounds kinda similar to what you're trying to do.

salud,
Bill

Comshark87’s picture

I was able to solve a similar issue using Custom Links and the Token Module. Thanks for the tip!

quicksketch’s picture

Status: Active » Closed (fixed)