Line 8: | Line 8: | ||
<syntaxhighlight lang="php"> | <syntaxhighlight lang="php"> | ||
− | + | // Let subscriber receive email in HTML format | |
+ | HTML = 1; | ||
− | + | // Full url to where you have installed PHPList e.g. https://example.com/list | |
+ | PHP_LIST_URL = ''; | ||
− | + | // Name of the form field holding the email of the subscriber | |
+ | FIELD_EMAIL = 'email'; | ||
− | + | // Name of the form field holding the name of the subscriber | |
+ | FIELD_NAME = 'name'; | ||
− | + | // Name of a form field where its value holds the name of another form field holding the email of the subscriber | |
+ | FIELD_AS_EMAIL = 'useFieldAsEmail'; | ||
− | + | // Name of a form field where its value holds the name of another form field holding the name of the subscriber | |
+ | FIELD_AS_NAME = 'useFieldAsName'; | ||
// If the form holds no information on what list to subscribe to, the subscribe the user to the following lists by default. | // If the form holds no information on what list to subscribe to, the subscribe the user to the following lists by default. |
Revision as of 22:21, 30 March 2023
Extension name : phpList
Allows for subscribing a user to your instalment of PHPList. ( https://www.phplist.org )
PHPList needs a name and an email address as a bare minimum, so a form should provide that information.
All the other configuration settings can be done inside the PostHandler PHP file. ( FlexForm/src/Modules/Handlers/phpList/PostHandler.php
)
// Let subscriber receive email in HTML format
HTML = 1;
// Full url to where you have installed PHPList e.g. https://example.com/list
PHP_LIST_URL = '';
// Name of the form field holding the email of the subscriber
FIELD_EMAIL = 'email';
// Name of the form field holding the name of the subscriber
FIELD_NAME = 'name';
// Name of a form field where its value holds the name of another form field holding the email of the subscriber
FIELD_AS_EMAIL = 'useFieldAsEmail';
// Name of a form field where its value holds the name of another form field holding the name of the subscriber
FIELD_AS_NAME = 'useFieldAsName';
// If the form holds no information on what list to subscribe to, the subscribe the user to the following lists by default.
DEFAULT_LISTS = [
3 => 'signup',
4 => 'signup',
5 => 'signup',
6 => 'signup',
7 => 'signup',
8 => 'signup'
];