-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Message about confidential form not displayed for referenced webform #169
Comments
There are two issues in the Drupal queue which aren't directly related but would solve my use-case:
Both Drupal issues need review or work, and the last activity was some time ago. They seem to be reasonable requests, though. Is there any chance that such features get added to the Backdrop version of Webform before they're added to the Drupal version? |
In the last weeks the editors of one of my Backdrop sites stumbled again about this issue. To sum up the problem: When a webform is 'confidential' and embedded in content via a node reference, logged in editors can't see neither the webform nor the message that you "must log out to submit" (and see) the form. For this reason, it's super easy to overlook a referenced webform. On the mentioned website, it leads frequently to a situation where editors forget to disable the webform on past event nodes, just because they do not see the form (or a message about it) when viewing the node. @quicksketch and @herbdool What do you think about the issue? In my opinion, the behavior around 'confidential' submissions can be really misleading. Unfortunately, I'm not able to provide a solution. I hope you're open to discuss ideas for an improvement here, or a workaround. |
I can confirm the same behaviour using Entity reference within a paragraph. I tried adding a small bit of code into the module to see what could be done. I inserted this at line 2077 (after the section marked 'Add the output to the node'). if ($node->webform['confidential']) {
backdrop_set_message('Webform disabled', 'status');
} The message showed up twice when embedded, once when , whereas the default confidential message didn't show up. I think the best solution would be to show the form but have it disabled and ensure the message gets shown regardless of whether it's shown independently or embedded. I did a bit of experimentation but couldn't easily work out all the places that would need to change to enable that. I think of the two D7 issues you mention, https://www.drupal.org/project/webform/issues/2732435 looks the simplest to implement. |
@olafgrabienski - as a simpler workaround, you could probably create a small custom module utilising Here is one I created as a small test: <?php
/**
* @file
* Webform IP Address Remove primary module file
*/
/**
* Implements hook_webform_submission_create_alter().
*/
function webform_ipaddress_remove_webform_submission_create_alter(&$submission, &$node, &$account, &$form_state) {
$submission->remote_addr = t('(unknown)');
} My info file looked like:
Now this is pretty indiscriminate and would act on any node, but I think as the |
@yorkshire-pudding Many thanks, the custom module works fine! As I don't need to limit the behavior to individual forms, I'm just using it without having added a condition. Mid-term it would be nice to integrate an IP removal option in Webform, it's more useful than the 'confidential' setting, in my opinion. |
With the option "Confidential submissions" enabled on
node/YOUR-NID/webform/configure
, you can't view the webform while logged in to the Backdrop site. Instead, you get the messageThis form is confidential. You must Log out to submit it.
Okay!For a referenced webform (to be displayed as Rendered node), I can't view the webform as well while logged in, as expected. But I also don't see the message. So, as an admin or as an editor, I'm missing a hint that there actually is a webform for logged-out people.
Steps to reproduce:
Actual result:
Neither a webform (expected) nor a message (problematic).
Expected result:
Display the
This form is confidential ...
message.Additional information:
For the reference field, I've used Node Reference from the References module.
The text was updated successfully, but these errors were encountered: