0

When I add a value element to a new webform draft and I attempt to prepopulate the element with a token listed as available, the element does not get populated.

3
  • You need to provide more detail, like the element and how you're currently trying to prepopulate it.
    – beltouche
    Commented Mar 12, 2020 at 22:12
  • Thanks for your response @beltouche I am trying to populate a new webform, with one element. The YAML source is: user_name01: '#type': value '#title': 'User Name' '#value': '[current-user:display-name]' flexbox: '#type': flexbox Commented Mar 12, 2020 at 23:38
  • Drupal core version is 8.8.3, webform, related webform modules, views and webform_views are installed. All modules are up to date. Commented Mar 12, 2020 at 23:51

1 Answer 1

0

@beltouche: It should be noted that this YAML source creates a webform that internally stores the displayname property. As a result the identified user is stored wherever the webform submissions are stored. I now assume this is as designed. It seems to me that the prepopulation of a webform using something like {{ user.displayname }} is best accomplished by using a block/webform hybrid content type. Am I on the right track with this thinking?

2
  • Please do not post updates to your question as an answer, use the "Edit" link below the original question instead. Thanks a lot.
    – Hudri
    Commented Mar 13, 2020 at 20:24
  • @Hudri Even if the "Edit" link is disabled after 5 minutes and an additional comment is believed needed to avoid possible confusion? I'm new to this forum, so your patience is appreciated. Commented Mar 15, 2020 at 0:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.