Creating a new form using JustHumans.com verification

From JustHumans

Jump to: navigation, search

This page describes how to create a new form with JustHumans.com verification. It presumes you have already signed up for the JustHumans.com service and logged in.

Forms can have any number of fields named just about whatever you want. We will create a new form with two fields, name and comments at the end of this exercise.

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.

Fill Out the New Form 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. Usually this is a "Thank You" page letting the user know that things worked if they clicked the correct image. An example would be something like:

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

Create an HTML page on your website and add a form. For example, a simple HTML page with a contact form might look like this:

<html>
 <head>
  <title>Contact</title>
 </head>
 <body>
  <h1>Contact Us!</h1>
  <form method="post">
   Name: <input type="text" name="name"><br />
   Comments:<br />
   <textarea name="comments"></textarea><br />
  </form>
 </body>
</html>

Notice that we don't have a "submit" button not an "action URL" for the form in this HTML.

Next we will add the JustHumans code where we would usually have our submit button like this:

<html>
 <head>
  <title>Contact</title>
 </head>
 <body>
  <h1>Contact Us!</h1>
  <form method="post">
   Name: <input type="text" name="name"><br />
   Comments:<br />
   <textarea name="comments"></textarea><br />
   <script language="JavaScript" src="http://verify.justhumans.com/verification.js?k=a1b2c3"></script>
  </form>
 </body>
</html>

Save your edits and upload the new page to your webserver.

Create a "Thank You" Page

This is just an HTML page that thanks our users for submitting the form. Because we redirect the user to www.example.com/thanks.html above, we'll call this file thanks.html.

<html>
 <head>
  <title>Thank You</title>
 </head>
 <body>
  <h1>Thank You!</h1>
  We'll be back to you.
 </body>
</html>

Test the Code

Load your new page and give the 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. You should be redirected to the thanks.html page at the end.

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