Jump to content

Captcha types. Add new


newbie LAC
 Share

Go to solution Solved by bfarber,

Recommended Posts

  • 4 weeks later...
On 28.12.2015 at 11:02 PM, bfarber said:

I've abstracted to a method for the next release to make it simpler to override and add new options.

Hello,

Thank you.

Could you separate form elements and saving form?

Currently I use 

	/**
	 * Show CAPTCHA settings
	 *
	 * @return	string	HTML to display
	 */
	protected function _manageCaptcha()
	{
		$captchaForm = parent::_manageCaptcha();

		$captchaForm->add( new \IPS\Helpers\Form\Text( 'newcaptcha_pub_key', \IPS\Settings::i()->newcaptcha_pub_key, FALSE, array(), NULL, NULL, NULL, 'newcaptcha_pub_key' ) );

		// Added this to save newcaptcha_pub_key setting
		if ( $captchaForm->values() )
		{
			$captchaForm->saveAsSettings();
		}
		
		return $captchaForm;
	}

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...