Connecting subscription forms in Drupal to Maileon can be done by setting up a WebForms HandlerWebForm and a handler.
However, since field names in WebForms Handlers may only contain lowercase letters, a middleware to convert the field names is required.
...
Name | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencodedDie MIddleware wird aus einem POST-Formular angesprochen, genauer gesagt muss der Content-Type-Header auf „application/x-www-form-urlencoded“ gestellt und die Daten wie üblich als Teil des Bodies übertragen werden | The middleware accepts standard form POST inputs. For this, a specific content type header must be send with each request. |
Parameter
Name | Required / Optional | Default | Description | Type |
---|---|---|---|---|
api_key | Required | The Maileon API key to access the REST API and to identify the Maileon account. New keys can be created in Maileon under Settings → API Keys. | String | |
permission | Optional | 1 (Permission “None”) | The contact’s permission if no DOI process should be started. Will be ignored and set to the default otherwise. Available permission methods: Check the documentation for further information about all available permission methods. | Integer |
doi | Optional | false | Flag to start a DOI process for a new contact. | Boolean |
tracking | Optional | false | Flag to set allowance for individual user tracking (Opens, Clicks etc.). | Boolean |
doi_key | Optional | An alphanumerical key to identify a DOI mailing to be used in the DOI process. If omitted the account’s default DOI mailing will be used. | String | |
webform_id | Optional | ID of the WebForm. May be used to segment contacts in Maileon by filtering for the “src” attributeDOI attribute “subscriptionPage” (and/or the DOI attribute “source = Drupal”). | String | |
Required | The contact’s email address. Can not be part of the mapping parameters listed below. | String | ||
salutation | Optional | The contact’s salutation. May also be defined by using the standard field mapping. | String | |
fullname | Optional | The contact’s full name. May also be defined by using the standard field mapping. | String | |
firstname | Optional | The contact’s first name. May also be defined by using the standard field mapping. | String | |
lastname | Optional | The contact’s last name. May also be defined by using the standard field mapping. | String | |
mapping_standard_fields | Optional | E.g.: | JSON-String | |
mapping_custom_fields | Optional | E.g.: | JSON | |
<additional-fields> | Optional | Any additional fields that are being mapped in one of the above mappings. | String |
WebForm configuration
...
The mapping is being defined by a JSON object, in which the object’s attribute name maps the field's name in the WebForm and it’s value maps the field's name in Maileon.
Info |
---|
A list of all available standard fields in Maileon can be found in the documentation. |
Example:
Code Block |
---|
{
"Field in WebForms": "Field in Maileon",
"fname": "FIRSTNAME",
"lname": "LASTNAME",
"street": "ADDRESS",
"zip": "ZIP",
"city": "CITY"
} |
...