Skip to main content

Sign Up Form

It's often best practice for websites to allow customers to sign up for client communications. The easiest way to allow customers to do this is via the Sign Up Form which can also be used to create a customer account at the same time.

We provide an open endpoint which, along with a standard HTML <form>, allows websites to capture a customer's Name, Email and set Contact Preferences. This form will be unable to collect any additional Customer information than those three details.

If it is necesarry to collect additional information — whether it is Tags, Attributes, or something else — you will need to explore an alternate solution likely using the API. See the guide on API Sign Up Forms for more information.

Overview

When a customer fills in the form:

  • A customer account is created on the system with three basic details:
    • First Name
    • Last Name
    • Email Address
  • Any Contact Preferences on the system that are set to "Connect to DotDigital" will also be attached to the record as a "Yes".
  • If the relevant setting is chosen in the Spektrix system's Settings Interface, the customer will receive an email confirming their new account and including a link asking them to set a password.
  • The customer will have 2 hours to set a password before the link expires.

If a customer's email already exists, the form will still update the Contact Preferences on that Customer account. Whether the Customer creates a password or not, the account will be active from that point onwards. A customer can always reset their password via any login point in the purchase path.

Adding a Sign Up Form

Bot Management

Spektrix maintains a bot management solution to prevent spam Sign Up attacks. We would still encourage you to explore additional methods such as Honeypot traps and/or a Recaptcha solution to help discourage any attempts to attack this endpoint.

A standard HTML <form> element can be used for this purpose. This will require:

  • Three <input> text elements, each with a corresponding <label> to capture the customers details, with name attributes of

    • FirstName
    • LastName
    • Email
  • A hidden <input> element with a name of ReturnUrl, with the full page address of where you wish the user to be redirected to on submission.

  • An <input> element of type submit.

  • The <form> element attribute having an action of https://{custom domain}/{clientname}/website/secure/signup.aspx and a method of POST.

We provide this endpoint that the form data should be sent to. It will consume this information and also provide a redirect back to the value set in the ReturnUrl element. This redirect will also add URI parameters if any errors arise in validation.

Since the ReturnURL is the page on your website to which people are always sent after clicking the Submit button, you should make sure you choose an appropriate page that displays relevant information to customers. They will be sent to this page regardless of whether they have filled the form out correctly.

Below is an example of what this may look like.

tip

Make sure you replace the clientname field with your client name and custom domain with the custom domain used for the iframes of the website.

<form
action="https://customdomain/clientname/website/secure/signup.aspx"
method="POST"
>
<input
type="hidden"
name="ReturnUrl"
value="https://mydomain.com/pagetosend"
/>

<label for="FirstName">First Name:</label>
<input name="FirstName" id="FirstName" type="text" />

<label for="LastName">Last Name:</label>
<input name="LastName" id="LastName" type="text" />

<label for="Email">Email Address:</label>
<input name="Email" id="Email" type="text" />

<input type="submit" name="submit" value="Submit" />
</form>

Cloudflare Issues

If your DNS hosting provider is Cloudflare, you might run into issues with the Sign Up Form. This happens because Spektrix also uses Cloudflare which which can cause internal issues related to DNS resolution when submitting the form. If customers are running into a "1020 Access Denied" error message from Cloudflare upon form submission, you'll need to change the POST from the custom domain to system.spektrix.com. The Sign Up Form is both cookie-less and session-less so with current web browser standards, it is not subject to the same issues when utilizing other capabilities which require use of a matching subdomain.

It will not change the creation of the Customer Account or any affiliated information; however, this will impact a customer's path when clicking the email link to set a password. When using system.spektrix.com they will be sent to the webpage containing the Secure/LoginLogout.aspx iframe which will require them to request a link to reset their password again. This is in opposition to use of a custom domain where they would be sent to the page containing Secure/SetPassword.aspx which does not require that extra step.

If this behavior is undesired, you will need to consider using the API to create a form.

Handling Errors

When customers click the Submit button they will be returned to the page that you’ve specified as the ReturnUrl value. They will be sent to this page regardless of whether they have completed the form correctly or not.

If there were errors in the form, then a URI parameter will be appended to the return URL. This attribute will show what error was made - these errors are:

  • Error=NoEmail: when no email address has been given.
  • Error=NoLastName: when no last name has been given.
  • Error=InvalidEmail: when the email address provided is invalid.
  • Error=EmailAddressTooLong : The email address given is longer than 255 characters
  • Error=FirstNameTooLong : The first name provided is longer than 30 characters
  • Error=LastNameTooLong : The last name provided is longer than 80 characters

For example https://mydomain.com/pagetosend?Error=NoEmail would reflect the fact that the customer tried to create an account without inputting an email address.

Your return URL must therefore be able to handle these errors and display an appropriate message.

Gathering Further Information

If you want to create a form which gathers more than just the basic information, you can use the Spektrix API.