I’m a bit confused. The help videos say “pass node field values to webform settings”. Does this include any node field value or just global type ones? I have various user-defined fields on my node which I’d like to pass to the webform. Is that possible? Also, is it possible to use these tokens to, for example, set the minimum or maximum date for a date field?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rosbiffer created an issue. See original summary.

rosbiffer’s picture

Issue summary: View changes
jrockowitz’s picture

The webform node module must be enabled and the webform needs to be attached to a node for the [webform_submission:node:*] tokens to work.

The 'Webform Demo: Event Registration System' module includes an example of a [webform_submission:node:*] token.

jrockowitz’s picture

Status: Active » Closed (works as designed)
rosbiffer’s picture

Status: Closed (works as designed) » Active

Have got this working for most nodes but still need to know if I can pass date variables to a form for use in Date min or Date max for example?

jrockowitz’s picture

The default value for all date elements must use the ISO-date format (YYYY-MM-DD). If you wanted to pass a date field from a node to the webform you would use a token like [webform_submission:node:field_date:date:html_date]

jrockowitz’s picture

FileSize
520.02 KB

You can browse all node related tokens via /admin/help/token.

rosbiffer’s picture

ok, so as long as the date format in the node is in the format (YYYY-MM-DD) I should be able to use that in date min and date max and form closing dates?

jrockowitz’s picture

I don't think you can pass tokens to the webform open and close the dates because they are used before the webform is built.

jrockowitz’s picture

Status: Active » Postponed
jrockowitz’s picture

Status: Postponed » Closed (works as designed)