How to Automatically Submit Email for Known Users

A visitor comes to your website and submits their email. Now, you want to show them another box, but you don’t want to ask for their email again.

Box JS Before Submit

if(x.email) DIGIOH_COOKIE.set('digioh_latest_email', x.email);
var digioh_latest_email = DIGIOH_COOKIE.get('digioh_latest_email');
if (digioh_latest_email && !x.email) {
   x.email = digioh_latest_email 
}
return x; //must return the form data object to submit
On all form submissions, Digioh will store the visitor’s email used to subscribe. For other forms (without an email field), it will automatically submit the stored email.

Note: you may need to coordinate the box rules to “know” that the user has already submitted. Create boxes with the rule Cookie Exists digioh_latest_email, and these boxes will not need an email form field.

If you need help setting this up, just send us an email.