Webform_submission Token and Opening webforms in modal dialogs

Created on 18 February 2022, almost 3 years ago
Updated 9 March 2024, 9 months ago

Thank you for your work.
I had tried to do this, that is with webform_node and webform_attachment to attach file from a node but if it worked with files, it didn't with files as media: this kind of token [webform_submission:node:field_file:entity:url] works for files but not for media.
So your module was a great and good new.
But what is missing for me is that there is no token which refers to the node the file or media is part of (I want in the mail refers to the node [webform_submission:node] but token webform_submission does not work with your module.
Is the a way to have these tokens?
The other thing that is missing for me is the "link to form" capability of Webform that can open dialog modal for Form.
Is there a way to do this?
Thank you very much

Feature request
Status

Closed: outdated

Version

1.4

Component

Code

Created by

🇫🇷France jeanpaulbouvet

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇹Italy maurizio.ganovelli Arezzo

    I'm going to close older issues, feel free to reopen if still relevant.

    Opening form in modal is possible by injecting some attributes in link generated by the module formatter using hook_webform_attachment_gated_download_url_alter().

    Something like this:

    
    function mymodule_webform_attachment_gated_download_url_alter(Url $uri, $item) {
      $options= $uri->getOptions();
      $options['attributes']['class'][] = 'use-ajax';
      $options['attributes']['data-dialog-type'] = 'modal';
      $options['attributes']['data-dialog-options'] = json_encode(
        [ 'autoOpen' => FALSE,
          'title' => t('Confirm form'),
        ]
      );
      $uri->setOptions($options);
    }
    
    
Production build 0.71.5 2024