Adding JustHumans.com verification to an existing form

From JustHumans

Jump to: navigation, search

This page describes how to add JustHumans.com verification to an already existing form on a website. It presumes you have already signed up for the JustHumans.com service and logged in.

Contents

Create a New Form in JustHumans.com

Each form on your website where you intend to use JustHumans.com verification will need its own corresponding form on JustHumans.com. When you first login to JustHumans.com, you are presented with a list of forms (which may be empty) and a link to create a new one. To create a new form, click the "create a new one" link at the top of the page.

Form Name

Example:

Contact Form

Give your form a name. This is just used internally to identify your form. Emails from JustHumans.com when form submissions happen will use this form name in the subject line of the email so pick something short and unique.

Active

Example:

On

There is no way to delete a form in JustHumans.com. However, in the unlikely event that you want to stop this form verification from working, you would turn it off here. Lets leave it on for now.

Redirect the User

Example:

http://www.example.com/thanks.html

When a user fills out your form and clicks one of the JustHumans.com images, the form will post to JustHumans and the user will be redirected to this page. Obviously you would replace this URL with a URL to some place on your website that lets the user know that things worked if they clicked the correct image.

Email Data

Example:

joe@example.com

This is an email address where the contents of the form will be sent on a valid submission. The checkbox before the address field turns the sending of the email on and off. Lets leave it on and put in an email address.

Save in JustHumans.com Database

Example:

On

When this checkbox is selected, a copy of the form submission on valid posts will be saved in the JustHumans.com database as well. Lets leave this on as well just in case that email gets caught by your spam catcher.

Re-post URL

Example:

Off

This isn't a common option so we can probably just leave it off. If you wanted to though, you could have JustHumans.com re-post the form contents to your own CGI script or application. This way you could have posts happen the same way they used to without changing anything on your old system. See re-post URL for more information.

Images

Lets just go with the default JustHumans.com images. You can change them later if you would like something that matches your site a bit better.

Save

Don't forget to save your form! Once you do, it is created in the JustHumans.com system and you can start using it on your form.

Get the JustHumans.com Code for your New Form

Once you have saved your form, you should see your new form in the form list page. Click "Generate Code" under your form to get to the code page.

Select Style

There are a few options for the way the JustHumans.com verification is displayed. Select one that works for your particular application or just go with the default.

Change the Wording (optional)

You probably don't need to change this but if you would like to use different text, you can enter it here. For example, you could change the wording from "Click the (keyword) to submit." to "Click the (keyword) to continue."

Copy the Code

This is the critical step. Copy the code in the box within this step and save it. We're going to need it a little later when we create the new form.

Put the JustHumans.com Code on Your Website

Find the HTML page on your website that has the code for the form you want and open it in an editor. Find the <form ...> declaration that corresponds to the form you want to protect with JustHumans.com.

<form method="post" action="http://www.example.com/submit.cgi">

Remove the action URL so it looks something like this:

<form method="post">

Now, find the submit button in your code. It will probably look something like this:

<input type="submit">

Comment the submit button out like this: (so you can easily move back to it should you need.

<!-- <input type="submit"> -->

Add the JustHumans code that you copied in the last section right under your old submit button:

<!-- <input type="submit"> -->

<script language="JavaScript" src="http://verify.justhumans.com/verification.js?k=a1b2c3"></script>

Save your edits and upload it to your webserver.

Test the Code

Load your page with the new JustHumans.com code and give your form a try. Once you fill the form out and hit submit, check your email and the JustHumans.com database to make sure the post went through.

Additional Tweeks

Optionally, you can control the sort order of the fields that come back to you and pick fields to be sent as parameters back to your "Thank You" page.

Personal tools