1

Im NOT wanting to use recaptcha, or install a captcha, i want to use the built-in captcha framework that came as part of joomla 2.5. And add it to my custom forms and extensions.

  • Joomla 2.5 comes with re-captcha plugin as default captcha the integrations can be found here http://stackoverflow.com/questions/12894134/using-recaptcha-with-my-custom-form-in-joomla – Jobin Jan 30 '14 at 06:47
  • That is not what i am looking for - as i said i am not wanting recaptcha, i am wanting to use the captcha framework in joomla2.5 so that i can choose between captchas installed. For example the playthrough captcha. Those examples only showed configuring the recaptcha version, unless i missed something – Marisa Giancarla Jan 30 '14 at 06:51
  • Make sure you are running the latest version of Joomla 2.5 (2.5.17) as Google changed the URL of the reCaptcha – Lodder Jan 30 '14 at 08:55
  • Im not interested in recaptcha. I want the captcha API – Marisa Giancarla Jan 30 '14 at 10:55

1 Answers1

0

To add captcha to a form, simply add the captcha field: Assuming your component is com_something:

    <field
        name="captcha"
        type="captcha"
        label="COM_SOMETHING_CAPTCHA_LABEL"
        description="COM_SOMETHING_CAPTCHA_DESC"
        validate="captcha"
        namespace="something"
    />

The validation will handle it transparently for you. Look into com_contact and com_users for examples i.e. components/com_contact/models/forms/contact.xml

Riccardo Zorn
  • 5,590
  • 1
  • 20
  • 36