Attach an On Click script to the button called myEmailAddressCookieButton and paste the following code:
// set the email cookie to the value of the email address field
if(fields.emailAddress.value){
// add a cookie that expires in 60 seconds
client.addCookie("email_address_cookie", fields.emailAddress.value, 60);
}
else{
event.owner.addErrorMessage("Please enter an email address")
}