By FrankDesign


2017-08-14 10:27:11 8 Comments

I have a Drupal 8 website with an application form built with Webform. I would like to be able to auto create a user when the webform is submitted using details from the webform, so the person filling in the application can log-in and check the status of their application. I've seen several options online but all are for Drupal 7 and the modules used are not available for Drupal 8.

Any ideas?

1 comments

@mAtZ 2017-09-02 14:43:07

You can write your own WebformHandler to do so. Just extend WebformHandlerBase and write your code into the postSave() function. Here is a little example: https://gist.github.com/mharmuth/0ab021d5b65e4cab7c6efec951fc59e9

This class has to be stored in your custom module in the directory your_custom_module/src/Plugin/WebformHanlder/CreateUserHandler.php

After creating this handler, you will be able to add it in your webform under "Email/Handlers".

Hope this helps ;)

Related Questions

Sponsored Content

3 Answered Questions

[SOLVED] How to create a node out of a webform submission?

  • 2017-04-27 15:42:00
  • owenpm3
  • 3885 View
  • 2 Score
  • 3 Answer
  • Tags:   8 nodes webforms

1 Answered Questions

[SOLVED] User may edit their webform submissions, but only while in draft

  • 2018-07-22 14:43:01
  • William Turrell
  • 827 View
  • 1 Score
  • 1 Answer
  • Tags:   8 webforms

1 Answered Questions

[SOLVED] How do I create a collaborative webform using Webforms?

  • 2016-09-02 17:48:22
  • eniad
  • 66 View
  • 0 Score
  • 1 Answer
  • Tags:   webforms

1 Answered Questions

[SOLVED] Is it possible to stop a webform form during submission?

  • 2015-08-24 16:28:39
  • artfulrobot
  • 1223 View
  • 1 Score
  • 1 Answer
  • Tags:   webforms

2 Answered Questions

[SOLVED] Check for WebForm Errors

  • 2015-07-15 19:22:24
  • John
  • 36 View
  • 1 Score
  • 2 Answer
  • Tags:   webforms

1 Answered Questions

[SOLVED] Webform E-mail send to selected user

1 Answered Questions

[SOLVED] Webform-CiviCRM integration: autocomplete employer

  • 2014-11-17 00:47:33
  • Christopher Dunning
  • 366 View
  • 13 Score
  • 1 Answer
  • Tags:   webforms ajax civicrm

Sponsored Content