Advanced configuration

Suppose you want to add a CAPTCHA to the site-wide contact form. As you enable the Contact module and configure the various contact settings, you realize you're out of luck; The Captcha settings page on Administer » Site configuration » Captcha (adminster/settings/mycaptcha) doesn't list the contact form!

Now what?

This is the part where a bit of work is required. In order to add a CAPTCHA to arbitrary forms, MyCaptcha utilizes the helper modules Form store and Form Collect. The module Form store provides MyCaptcha with its list of forms, whereas Form Collect is an ultrasmall helper that can add any form to the Form Store.

Adding forms to the Form Store

As you can see in the image above, the contact form isn't listed in the Form Store. So, check whether the module Form Collect is enabled (admin/build/modules) and do as the help text says; Visit Administer » Site configuration » Form Store, tab Collect forms (admin/settings/form-store/collect).

Simply check "Collect forms while browsing the site" and save the configuration. Now, all you have to do is visit the forms you want to add to the Form Store, in our case the form on the path contact. The moment you, or another visitor views the form, it is added to the Store. Return to Administer » Site configuration » Form Store, tab Collect forms (admin/settings/form-store/collect) to disable the collection.

You will now see that the contact form, with the cryptic name contact_mail_page has been added to the Form Store.

You can use the Description field to provide a more friendly description. This description will, when available, be used by MyCaptcha. To edit or remove a form, click edit, then choose the appropriate action.

In our case, we will add the description "contact form" to the form with the internal name contact_mail_page, so we'll have a less confusing Captcha settings page.

Add a Captcha

After all this, you can visit Administer » Site configuration » Captcha (adminster/settings/mycaptcha) once more. The contact form is now listed on the page and a CAPTCHA (here in the most unreadable variant) can be added to it.


While the example just adds one form to the Form Store, you can add multiple forms in one sitting.
When you finish Form collection, visit Administer » Site configuration » Form Store, tab Collect forms (admin/settings/form-store/collect) to disable collection. You can now disable the module Form collect (on admin/build/modules).