Newsletter Signup Forms

The form below will add a new subscribed contact to your database, and display a pop-up message on success. 

The attribute ContactMode="register" is set on the <forms:form> UI control, which will register a new contact, and throw a validation error if the contact already exists.

<h4>Sign Up</h4> <p>Enter your details to receive e-mail updates from us.</p> <forms:form id="blog_signup_sidebar" onsuccesstoastmessage="Thanks! You have been successfully signed up" contactmode="register"> <forms:row label="* First and Last Names:"> <forms:editbox id="contact_first_name" width="70" validations="mandatory" /> <forms:editbox id="contact_last_name" width="133" validations="mandatory" /> </forms:row> <forms:row label="* Email Address:"> <forms:editbox id="contact_email" width="240" validations="mandatory,email" transformations="tolower" /> </forms:row> <forms:row type="one_column"> <forms:submitbutton value="Sign Up" /> </forms:row> </forms:form>

Request Marketing Consent

Contacts added to your database via other forms (such as contact forms), will be aded with the e-mail marketing status "Pending" to flag inferred consent.

Adding to the previous contact enquiry form article, you can explicitly ask users whether they want to receive e-mail newsletters, and set their e-mail marketing status to "subscribed" (line 12-14):

<forms:form id="contact_us" recordsubmissions="true" onsubmitredirect="/contact-us/success/" contactmode="store" onsubmitemailsubject="New Website Enquiry" onsubmitemail=""> <forms:row label="First and Last Names"> <forms:editbox id="contact_first_name" width="80" validations="mandatory" /> <forms:editbox id="contact_last_name" width="110" validations="mandatory" /> </forms:row> <forms:row label="E-mail Address"> <forms:editbox id="contact_email" width="200" validations="mandatory,email" transformations="tolower" /> </forms:row> <forms:row type="one_column" label="Message"> <forms:textarea id="message" width="99%" height="130" validations="mandatory" /> </forms:row> <forms:row type="one_column" label="Receive Our Newsletter"> <forms:checkbox id="contact_email_marketing_status" value="pending" valuechecked="subscribed" valueunchecked="pending" label="Subscribe to receive our e-mail newsletter." /> </forms:row> <forms:row type="one_column" align="center"> <forms:submitbutton value="Submit" /> </forms:row> </forms:form>