Create your form to collect subscribers

You need to create a form to collect subscribers.
You can create as many forms as you want, design it as you want, each form can be used in different places.
By default, we provide you a simple form that you can customize:

Get latest posts delivered right to your inbox
But what if you want to build your own form?
Let's see how you can do it.

How to create your own form

First, you need to go to the Forms section in your dashboard.
Then, select your campaign if you have more than one.

Campaigns

Select a campaign to use the form
Below the campaigns, you'll have an URL to use in your form.
This URL is unique to your campaign and will allow you to collect subscribers.
You can use this URL in your form action attribute.

Here is an example of a very basic form:

    <form action="https://rssfeedpulse.com/api/subscribe/your-campaign-id" method="get">
        <input type="email" name="email" placeholder="Your email" required>
        <button type="submit">Subscribe</button>
    </form>

                    

Advanced usage: keep your user on your website (for advanced users)

By default, the form will redirect the user to the RssFeedPulse website.
But you can avoid that and use a bit of javascript to keep the user on your website.
Be careful, the url you should contains `/api`

    <form action="https://rssfeedpulse.com/api/subscribe/your-campaign-id" method="get">
        <input type="email" name="email" placeholder="Your email" required>
        <button type="submit">Subscribe</button>
    </form>

    <script>
document.getElementById('newsletterRssFeedPulse').addEventListener('submit', function(event) {
    event.preventDefault(); // Prevent the form from submitting the default way

    var email = document.querySelector('input[name="email"]').value;
    var actionUrl = this.action;

    fetch(`${actionUrl}?email=${encodeURIComponent(email)}`, {
        method: 'GET'
    })
    .then(response => response.json())
    .then(data => {
        console.log('Success:', data);
        // You can add more actions here, such as showing a success message to the user
    })
    .catch(error => {
        console.error('Error:', error);
        // You can add error handling here
    });
});
</script>

                    
RssFeedPulse is still in its early days. All feedback is welcome.
If you have any questions, suggestions or issues, please don't hesitate to contact us