Open shahroznawaz opened 7 years ago
Could you please fix the Markdown? Thanks in advance.
Hi @mablae I'm trying to update the markup but somehow i'm failed to do it. I have tried it step by step but the recaptcha is not loading in my form. I have added this line, "->add('recaptcha', EWZRecaptchaType::class);" after enabling recaptcha in AppKernel.php but it's not loading.
There are deprecations to fix #113. Actually, I am not seeing those form deprecation warnings on master, just Twig deprecations.
@cilefen i have used the form builder. where should i replace these new changes?
@shahroznawaz What version of twig is installed?
@shahroznawaz please can you fix the code display in your original message?
@cilefen I have updated the code block. i havn't install twig. is this generating an error?
@shahroznawaz Ignore what I wrote about twig. Version 1.26.0 introduces deprecation alerts. I do not think they are relevant.
This is wrong:
/* * @Recaptcha\IsTrue / public $recaptcha; }
It is not totally clear in the README, but that property and annotation belongs on your User entity, not the controller class.
@cilefen that means i should write this code in User entity which i have created right?
Yes.
Or, set 'mapped' => false
on the form builder element and remove the property.
Thanx @cilefen, it works. but old recaptcha is added to the form.
Any ways to update it to the new one?
I get the new one. I am not familiar with this codebase. What version of this bundle are you using?
@cilefen I am using version 1.4 of this bundle
@shahroznawaz I had the same pbm. The old captcha was showing. I found that it was the case if i activated the ajax version in the config file. I just deleted the "ajax: true", empty the cache, and the new one show up.
Thanks @StefanKali, It worked for me too :)
This is still happening for me. The documentation doesn't mention the need for mapped => false
Nevermind, it's right there in Readme: There are no reference to the fact that the field needs to be added before that though, which is what got me.
I have installed the bundle in symfony 3.1 and enabled it in AppKernel.php but it's not showing in a form instead it's giving an error
Neither the property "recaptcha" nor one of the methods "getRecaptcha()", "recaptcha()", "isRecaptcha()", "hasRecaptcha()", "__get()" exist and have public access in class "AppBundle\Entity\User"
Usertype.php
RegistrationController.php
what's the problem with it please guide.