A subscription widget and helper methods to work with newsletter2go.com serivce.
Install the extension through composer:
composer require luyadev/luya-newsletter2go
<?php $widget = SubscribeFormWidget::begin([
'accessToken' => 123,
'listId' => 123,
'username' => '...',
'password' => '...',
]) ?>
<?php if ($widget->isSubscribed): ?>
<div class="alert alert-success">Thanks, your email address has been added to the subscription list.</div>
<?php else: ?>
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($widget->model, 'email'); ?>
<?= Html::submitButton('Submit'); ?>
<?php $form::end(); ?>
<?php endif; ?>
<?php $widget::end(); ?>