Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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?
Comment | File | Size | Author |
---|---|---|---|
#7 | Token Webform Demo Site.png | 520.02 KB | jrockowitz |
#6 | Screen Shot 2018-05-24 at 4.43.20 AM.png | 234.57 KB | jrockowitz |
Comments
Comment #2
rosbiffer CreditAttribution: rosbiffer commentedComment #3
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedThe 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.
Comment #4
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commented@see https://www.flocondetoile.fr/blog/token-and-chained-entities-drupal-8
Comment #5
rosbiffer CreditAttribution: rosbiffer commentedHave 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?
Comment #6
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedThe 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]
Comment #7
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedYou can browse all node related tokens via /admin/help/token.
Comment #8
rosbiffer CreditAttribution: rosbiffer commentedok, 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?
Comment #9
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedI don't think you can pass tokens to the webform open and close the dates because they are used before the webform is built.
Comment #10
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedComment #11
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commented