#Campaign Monitor UserForm Field Adds a custom field to UserForms which allows you to select a list from campaign monitor, set custom fields and subscribe on submission.
Via composer
composer require mediabeast/campaign-monitor-userform
#####Configuration To connect to your campaign monitor field you will need to set two fields in your config.yml.
EditableCampaignMonitorField:
api_key: 'API KEY GOES HERE'
client_id: 'CLIENT ID GOES HERE'
^ These setting can be found in client settings area in Campaign Monitor.
#####Customisation You can also change what type of field is actually used on the UserForm. By Default it's a checkbox field. You can change this via your config.yml. If you choose to use a dropwdown field you can add options under the Custom Options tab.
EditableCampaignMonitorField:
defaultFieldType: 'DropdownField'
There are currently 3 extension hooks which can be useful to handle data before and after saving.
$this->extend('beforeValueFromData', $data)
$this->extend('afterValueFromData', $data)
$this->extend('updateLists', $data)
add extension points e.g. Custom fields, change field typeAdded supoport for submission data e.g. Submission shows user was subscribed.- Better error message is something goes wrong