Custom Form
Snippet Installation Need
Make 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-id
with the actual ID of your campaign in Viral Loops - Set
data-vl-container
to"join-stage"
to indicate that this is the Join Stage of your campaign. - Set
data-vl-action
tojoin-stage#join
to indicate that users will join the campaign after the form submission - Add
data-vl-join-stage-target
to your input fields, and define their type by usinginput.email
,input.firstname
, andinput.lastname
- Test it out!
Updated almost 2 years ago
Whatβs Next
Enclose your form in a Join Stage and decide what happens after the form submission!