Active
Project:
Webform Node Element
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
23 Jun 2019 at 20:17 UTC
Updated:
17 Feb 2023 at 19:55 UTC
Jump to comment: Most recent
Gents,
trying to use a dynamic token to feed from a submission field element the requested id node in the webform node element module, but it does not compute nor upload, using [webform_submission:values:field_key:raw].
Any suggestion?
Thank you beforehand
Comments
Comment #2
jrockowitz commentedThe Webform Node Element does not currently support tokens but I am not exactly sure what you are trying to do. Please post some example code.
I am moving this issue to the Webform node element module's issue queue.
Comment #3
David Ben Arrosh commentedThank you J.
Comment #4
David Ben Arrosh commentedWhat I am trying to do:
1. create a field in the webform,
2. this field will update the nid to be displayed by the webform node element
I am lost with this last module since no doc available, have not created any code yeat hoping answer will be straightforward or someone had gone thru the trouble already
Comment #5
alarcombe commentedHi,
webform_node_element doesn't (yet) support tokens to define the nid to be displayed. However it _is_ possible to set the nid dynamically by subscribing to the WebformNodeElementPreRender::PRERENDER event and calling the setNid and setDisplayMode methods. This is described in the README and the webform_node_element_example module contains a working example.
Thanks,
Andrew
Comment #6
rodolfo_manut commentedgood afternoon, could you explain how to subscribe the WebformNodeElementPreRender::PRERENDER event and calling the setNid
Comment #7
rodolfo_manut commentedthis community was never the first because everyone here thinks they are the best and doesn't want to help those who arrive. whoever arrives again is not used to the terms used here, however intelligent you may know very well.
Comment #8
stephenplatz commented@rodolfo_manut the explanation is pretty clear in the above post by @alarcombe
If you look at the
ExampleEventSubscriberclass in thewebform_node_element_examplemodule you will see that this is demonstrated.