luyadev/luya-newsletter2go

A LUYA library for newsletter2go service.

Installs: 670

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 1

Open Issues: 0

Type:luya-extension

1.1.0 2020-03-31 17:54 UTC

This package is auto-updated.

Last update: 2024-04-06 19:52:51 UTC


README

LUYA Logo

LUYA Newsletter2Go

LUYA Latest Stable Version Total Downloads

A subscription widget and helper methods to work with newsletter2go.com serivce.

Installation

Install the extension through composer:

composer require luyadev/luya-newsletter2go

Usage

<?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(); ?>