This page demonstrates a basic newsletter form that uses the Appizer Web SDK. Enter your App ID, initialize the SDK, and submit the form to see the SDK in action.
When checked, the email input's name changes to contact_email, and SDK is configured via emailField/emailSelectors.
This form is marked with data-appizer="true" so the SDK will auto-hook its submit event. It does not block your normal submit.
<script src="https://cdn.appizer.com/js/appizer-web.js"></script>AppizerWeb.init({ appId: 'YOUR_APP_ID' })data-appizer="true" or containing an email input are hooked.emailField: 'contact_email' or emailSelectors to locate non-standard email fields.https://api.appizer.com/v1/website/users with { appId, websiteUrl, email, name }.Use these snippets as a reference while interacting with the demo above.
<script src="https://cdn.appizer.com/js/appizer-web.js"></script>
<script>
AppizerWeb.init({
appId: "YOUR_APP_ID",
// Optional: support non-standard email input names
// emailField: "contact_email",
// emailSelectors: ["input[name='contact_email']", "input[type='email'][name='contact_email']"]
});
</script>
<form id="newsletterForm" data-appizer="true" action="#" method="post">
<input id="demoEmail" type="email" name="email" placeholder="you@example.com" required />
<input id="demoName" type="text" name="name" placeholder="Ada Lovelace" />
<button type="submit">Subscribe</button>
</form>
const options = { appId: "YOUR_APP_ID", debug: true };
// Optional custom email input name mapping
// options.emailField = "contact_email";
// options.emailSelectors = ["input[name='contact_email']", "input[type='email'][name='contact_email']"]; // aids auto-hooking
// Auto-register forms and hook submit events alongside your handlers
AppizerWeb.init(options);
// Optional: Manual hook for a specific form
// const form = document.getElementById('newsletterForm');
// AppizerWeb.registerForm(form, options);