Custom Form
Snippet Installation NeedMake sure you have completed the Installation Step
Integrating a simple custom Form
To use a custom form with Viral Loops you need to add some custom data-attributes to its HTML.
<form
data-vl-campaign-id="your-campaign-id"
data-vl-container="join-stage"
data-vl-action="join-stage#join">
<input
data-vl-join-stage-target="input.email"
type="email"
placeholder="Enter your email"
/>
<input type="submit" />
</form>- Copy the HTML code into your website or content management system.
- Replace
"your-campaign-id"indata-vl-campaign-idwith the actual ID of your campaign in Viral Loops - Set
data-vl-containerto"join-stage"to indicate that this is the Join Stage of your campaign. - Set
data-vl-actiontojoin-stage#jointo indicate that users will join the campaign after the form submission - Add
data-vl-join-stage-targetto your input fields, and define their type by usinginput.email,input.firstname, andinput.lastname - Test it out!
Updated 5 months ago
What’s Next
Enclose your form in a Join Stage and decide what happens after the form submission!
