Eloqua 10 makes it very easy to add validation to form fields.  However, occasionally you may want to do something a little more advanced with form field validation, such as password protecting a form submission or adding a mathematical captcha.  In Eloqua 9 you can create these types of validations with custom server-side validation rules, however in Eloqua 10 there isn't yet a native feature to support these types of more advanced validations.  Below is the process you can use to add password protection or a mathematical captcha to a form.

 

  1. Step 1 - Create the target form (the form that will receive the submission after a successful validation).  This form will contain all of the processing steps and actions you want the registrant to have after they've successfully validated their form submission.
  2. Step 2 - Create the passthrough form (the form that will originally receive the initial submission).  The passthrough form will have the same fields as the target form, but will only contain three processing steps to achieve the validation:
    1. Redirect to Web Page: Configure the first redirect to web page to redirect to the thank-you page.  Add a condition to verify that the form field password/captcha IS equal to a specific value.  This implies it'll only redirect to the thank-you page when the correct value is submitted.
    2. Redirect to Web Page: Configure the second redirect to web page to redirect to a validation error page.  Add a condition to verify that the form field password/captcha IS NOT equal to a specific value (the same value as the first redirect check).  This implies it'll only redirect to the validation error page if the correct value is not submitted.
    3. Post Data to Server: Here we will have the form re-post the data to the target form created in step 1.  Add a condition to verify that the form field password/captcha IS equal to a specific value (the same as those in the redirect check).  This implies that the form will only re-post to the target form if the correct value is submitted.  To successfully repost to an Eloqua form, you need to include the site id, target Eloqua form name, and a couple of tracking fields.  The rest of the fields you can control in the field mapping.  Below is a sample destination URL, you'll need to replace the variables in CAPS with the correct value for the target form.  You can find these values by going to your target form, selecting the Gears icon, then selecting the View Form HTML option, and selecting the Integration Details tab.
      1. http://YOUR_POST_URL/?elqSiteID=YOUR_SITE_ID&elqFormName=TARGET_ELOQUA_FORM_NAME&elqCustomerGUID=&elqCookieWrite=0
      2. Where:
        1. YOUR_POST_URL = The url in the "Post URL for this form" section
        2. YOUR_SITE_ID = The site id specified as the value for the "elqSiteID" field
        3. TARGET_ELOQUA_FORM_NAME = The value specified for the "elqFormName" field

 

Following this process will allow you to achieve either a password protected form, or a form with a mathematical captcha validation.

 

EDIT: You can achieve a similar validation by adding the conditions to all of the processing steps on the target form, but then you're limited to that being the only condition for those processing steps.  The process above will allow you to have the conditional steps in the target form still in tact.

 

Cheers,

Ryan