Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscription integration problem #82

Open
afrizalhabibi opened this issue Oct 7, 2021 · 1 comment
Open

Subscription integration problem #82

afrizalhabibi opened this issue Oct 7, 2021 · 1 comment

Comments

@afrizalhabibi
Copy link

Hi, thanks for your amazing theme, I have problem with subscription problem, i cannot understand how to integration my formspree email on this theme. Could you help me to explain it?

@stephenajulu
Copy link

stephenajulu commented Oct 8, 2021

Personal advice. Replace the one provided and use this.

<section id="subscriptionSection" class="section narrow">
    <div class="subscription-container">
        <div class="subscription-content">
            <h3 class="subscription-heading">
                Join our email list and get notified about new content
            </h3>
            <p class="subscription-text">
                Be the first to receive our latest content with the ability to
                opt-out at anytime. We promise to not spam your inbox or share your
                email with any third parties.
            </p>
            <form id="subscriptionForm" class="subscription-form" action="{{ .Site.Params.formaction }}" method="POST">
                <input
                  id="emailInput"
                  class="subscription-input"
                  placeholder="[email protected]"
                  name="email"
                  type="email"
                  required
                  pattern="^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$"
                />
                <button id="submitButton"
                  class="submit-button"
                  type="submit"
                >
                    Subscribe
                </button>
                <div class="subscription-error-message">
                    The email you entered is not valid.
                </div>
            </form>
        </div>
    </div>
</section>

{{ $script := resources.Get "js/addFormStyles.js" }}
<script src="{{ $script.RelPermalink }}"></script>

Remember to add formaction under params in the config file, like this

params:
  formaction: https://formspree.io/f/exmple

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants