3

there are a few things that could go wrong with this. Ajax callbacks can be a really hard thing to do and often requires a bit of trail and error. Hope this helps. First of all, when your ajax callback function should not contain the "::". This is only used when you are programming inside a Class, right now you're in a .module. So you can change to. '...


1

The best way to do this is to write your own webform handler and attach it to the webform's postSave() method. You can also experiment and try another method if needed from WebformHandlerBase. Webform handlers are not documented well, but they should be because they are quite useful. modules/custom/mymodule/src/Plugin/WebformHandler/MyModuleWebformHandler....


1

I'll provide 2 links as an answer, but it has really been answered by others. Write custom webform handler: How to create a custom Webform handler to submit to a SOAP API Use hook_form_alter() to add a custom submit handler. Add a custom submission handler to a form Drupal 8 version of hook_form_alter(): https://api.drupal.org/api/drupal/core%21lib%...


Only top voted, non community-wiki answers of a minimum length are eligible