ArrayList a simple List DB Service

How to create Email form with ArrayList.org

·

2 min read

I have a habit of building small side projects. Couple of them are KeyVal.org and ArrayList.org. None of them require API authentication.

KeyVal.org as the name says it simple key:value db.

ArrayList.org is a REST API service for creating lists and adding elements to them.

You can create a unique list by visiting Arraylist.org. Click on 'Create List', and it will generate a unique list for you and provide you with two URLs.

  1. One to add elements to your new list.

  2. Second url to see the elements from that list.

Important: Don't forget to store the second url, it contains a password to read.

Use Case: Email subscription form. One good use case is a user subscription form. Let's say you have a "coming soon" page and you want to add an email subscription form.

ArrayList can collect your emails without needing a backend API or database.

A sample HTML Form and Javascript code. Remember to replace the action url with your own list url.

<html>
<body>

<iframe name="dummyframe" id="dummyframe" style="display: none;"></iframe>
<form name="emailform" action="https://api.arraylist.org/add/7nmldtl6e2/" target="dummyframe" >
  <label for="fname">Email:</label><br>
  <input type="text" id="email" name="email" value="">
  <input type="submit" value="Submit">
</form>
        <script>
            let eform = document.forms["emailform"];
            eform.addEventListener("submit", (e) => {

            alert("Thank You");    
             });
    </script>

</body>
</html>

You can retrieve your form submissions with the second password URL. Let me know if you need any additional features.