Created on 24 April 2023, over 1 year ago
Updated 11 May 2023, over 1 year ago

I'm missing something basic I guess. How would you go about opening a webform through an ECA action, e.g. the default contact webform?

In the ECA model I put an event pointing to an action. As template for the action I take "Open Webform". Under custom properties of the action I then have a field for "Entity" with description "Provide the token name of the webform that this action should operate with.". I tried "contact", "[webform:id:contact]" and some variations to no avail.

What I always get is a "Error: Call to a member function access() on null in Drupal\webform\Plugin\Action\WebformEntityOpenAction->access() (regel 33 van /var/www/html/www/modules/contrib/webform/src/Plugin/Action/WebformEntityOpenAction.php)" since the $object WebformEntityOpenAction tries to ask the access of is null.

What would I need to put in Entity to open the default contact webform flow?

💬 Support request
Status

Closed: works as designed

Version

1.0

Component

Documentation

Created by

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

Comments & Activities

  • Issue created by @sboden
  • 🇩🇪Germany jurgenhaas Gottmadingen

    Sorry @sboden I'm not sure what you want to achieve with "Open a webform". Could you explain what flow you want to achieve, i.e. what does the user journey look like for what ECA should accomplish here?

  • Present a specific webform to a user.

    What I would like to have is a model that "When a user logins and certain conditions are met, have him fill in webform x. When some other conditions are met have him in webform y".

    The conditions/webform are currently hardcoded in a controller, but it would be nice to make it "no code/low code" with ECA.

    I've just been looking in the code, "open webform action" sets the status to open but not much more.

    Regards,
    Sven

  • 🇩🇪Germany jurgenhaas Gottmadingen

    Well, the webform is a page with a URL, right? Then you probably just want to use the "Redirect to URL" action when all conditions apply, to let the browser open the page that contains the webform.

    Maybe this sample (https://ecaguide.org/library/use%20case/eca_feature_demo/) from the ECA Guide gives you some inspiration of what can be done after login or after registration, etc.

  • Status changed to Postponed: needs info over 1 year ago
  • 🇩🇪Germany jurgenhaas Gottmadingen
  • Status changed to Closed: works as designed over 1 year ago
  • I mistakenly thought "open webform" would start a webform, but that's not what it's for.
    I wrote an ECA action that starts a webform.

Production build 0.71.5 2024