Skip to content

luyadev/luya-newsletter2go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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