How to pass field data from custom node type to webform block? I'm using the Webform module's block on custom content type.

The webform has some text fields and I want to pass some data from my custom content type fields to webform fields.

I tried to add a default value by using tokens but it didn't work ([node:custom_content_type_custom_field] is shown on the available tokens but didn't work).

How can I pass field data from current (custom) node to webform block?
The only way to do this is using a hook_form_alter against the webform block. Webform is a great module overall but when you step outside of what it provides out of the box it gets complicated. The hook_form_alter will need to be set to only modify that form based on the form ID that gets created when the form is built.

The code will be similar to this:

/**
 * Implements hook_form_alter().
 */
function yourmodule_form_alter(&amp;$form, $form_state, $form_id) {
  if ($form_id == 'webform_client_form_103') {
  // Do your mods.
  }
}


NOTE: 'webform_client_form_103' will be replaced with your form id.