Hi,
My goal is to send webflow form data to ReferralHero plugin so that a new account can be created in referralhero for every form submission.
ReferralHero calls this process “Add subscriber manually” in their documentation which also has j script instructions: Add a subscriber manually - ReferralHero
I can’t get this to work. I suspect I’m not labeling form elements correctly and/or having labels confused between class elements and IDs.
Here’s a link to my super basic form which only has one field - email field.
and here’s the script I’m entering into my page (body section).
script start
var signup1 = document.getElementById(‘signup1’);
signup1.addEventListener(“submit1”, function(e){
var data = {
email: signup1.querySelector('#email1'),
terms: true // Terms and conditions. Mandatory if your campaign requires the acceptance of T&C
};
if (RH) {
RH.form.submit(data);
}
})
script end
Any help figuring this out would be so much appreciated.
Best,
David