Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use with Nette\Forms standalone #11

Closed
gebeer opened this issue Apr 28, 2017 · 4 comments
Closed

Use with Nette\Forms standalone #11

gebeer opened this issue Apr 28, 2017 · 4 comments
Assignees

Comments

@gebeer
Copy link

gebeer commented Apr 28, 2017

Hello, is it possible to use this extension with the standalone Nette\Forms? Without the whole framework.
I installed it via composer and tried adding it like

use Nette\Forms\Form,
Minetro\ReCaptcha\Forms,
Nette\Forms\Controls;

But I get an error: Exception: Call to undefined method Nette\Forms\Form::addReCaptcha(). (in /DATA/htdocs/vendor/nette/utils/src/Utils/ObjectMixin.php line 70)

my composer devs:

  "require": {
    "php": ">=5.3.8",
    "nette/forms": "^2.4",
    "minetro/recaptcha": "^2.0.0"
  },

actual PHP version is 5.7
Without adding recaptcha my form is working fine.

@f3l1x
Copy link
Member

f3l1x commented Apr 30, 2017

Hi. Thanks for the question. The answer is YES, but it's little bit complicated.

You have to call ReCaptchaBinding:bind manually.

Take a look: https://github.com/minetro/reCAPTCHA/blob/master/src/Forms/ReCaptchaBinding.php#L19-L29

@f3l1x
Copy link
Member

f3l1x commented May 29, 2017

@gebeer Is everything ok? Can I help you any further?

@f3l1x f3l1x self-assigned this May 29, 2017
@gebeer
Copy link
Author

gebeer commented May 30, 2017

@f3l1x thank you for looking into this and supplying the link.
I will continue work on that project next week and will let you know then how it goes.

@f3l1x
Copy link
Member

f3l1x commented Apr 6, 2018

I'm closing it now. Feel free to open it again.

@f3l1x f3l1x closed this as completed Apr 6, 2018
@f3l1x f3l1x changed the title use with Nette\Forms standalone Use with Nette\Forms standalone Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants