Purpose: The Webform Invitation module allows you to restrict submissions to a webform by generating codes (which may then be distributed e.g. by email to participants).

Usage: Install module using the standard procedure. When viewing a webform, there are two new pages under "Webform".

  • Invitation Settings only contains the option to activate the invitation mode for the current webform. Upon activating the invitation mode for a webform, a new component will automatically be added to the webform where the code has to be entered.
  • Invitation codes shows a list of all codes that have been generated for this webform so far. The list also indicates if a code has been used yet or not. Above the list a form allows you to generate new codes, you can choose the number of codes to generate. Default option generates 32-digit md5 hashs; custom options allows you to choose between different characters sets to be used for codes. At the bottom of the page you'll find a link to download all codes in MS Excel format. The download is named codes-[nid].xls with [nid] indicating the webform's node id.

The code has to be entered into the automatically created textfield. Alternatively, it may also be submitted by adding ?code=[CODE] to the webform's url.

When the participant hits the submit button, the code will be checked for
validity.

8.x-1.x Current D8 version Webform invitation has been fully ported to Drupal 8 based on the functionality of the 7.x-2.x branch. Huge thanks to kyberman (Morpht)! Beta version is available below – testing is welcome.

7.x-2.x Preferred version Generally, offers same functionality as 1.x but was changed to work with Webform 4 (made originally against 7.x-4.0-rc3) and contains some improvements such as showing submission IDs for used codes and behaviour upon disabling the module.

7.x-1.x offers options for the code generation, e.g. codes containing only numbers, certain characters and with a defined length.

Note for MySQL 5.7.6 and above: Originally, this module's db schema contains a column named "generated". However, as of MySQL 5.7.6, GENERATED is a reserved word and shouldn't be used for column or table names. The dev version contains a patch for that.

Note: This module only provides the generation and checking of codes. It does not handle sending invitation emails. However, codes can be downloaded and then be used in a mass mailer application.

Dependencies:
Webform Invitation 8.x-1.x requires Webform 8.x-5.x, for the current beta1 version, please make sure to have Webform 5.0-beta19 at least, there was an API change from beta18
Webform Invitation 7.x-2.x requires Webform 7.x-4.x and Token module
Webform Invitation 7.x-1.x requires Webform 7.x-3.x (Token module is not required as Webform internal tokens are used, deprecated in Webform 4).

The initial development of this module (D7) has kindly been sponsored by the Ecologic Institute, the D8 port was provided by Morpht.

Supporting organizations: 
Sponsorship of original D7 module development
Ported the module to D8

Project information

Releases