GithubHelp home page GithubHelp logo

Comments (6)

DethAriel avatar DethAriel commented on July 27, 2024 1

Hi, @troygerber . value accessor is an Angular mechanism for accessing form control values. ng-recaptcha has its own implementation of ControlValueAccessor. Did you import the RecaptchaFormsModule in the NgModule.imports section?

from ng-recaptcha.

DethAriel avatar DethAriel commented on July 27, 2024

Hello, and thx for submitting this! What error do you get? The selector for forms-rekated directive is re-captcha[formControlName],re-captcha[formControl],re-captcha[ngModel], so it should work as long as you import { RecaptchaFormsModule } from 'ng-recaptcha/forms' and import it to your app/shared module. Could you please provide more information about the environment you're working in and the error itself?

from ng-recaptcha.

DethAriel avatar DethAriel commented on July 27, 2024

@AClavijo do you mind providing more information about the error you're running into, or have you resolved the issue?

from ng-recaptcha.

troygerber avatar troygerber commented on July 27, 2024

I'm also trying to use this with dynamic forms.
I'm importing:

import { RecaptchaModule } from 'ng-recaptcha';
import { RecaptchaFormsModule } from 'ng-recaptcha/forms';

Template:

<div [formGroup]="form">
  <re-captcha [formControlName]="question.key" (resolved)="resolved($event)" siteKey="key">
  </re-captcha>
</div>

Error:
No value accessor for form control with name: 'captcha' ('captcha' is what is in question.key)

I'm guessing this is because <re-captcha> does not have a value attribute?

from ng-recaptcha.

troygerber avatar troygerber commented on July 27, 2024

Thanks @DethAriel, adding RecaptchaFormsModule to the NgModule.imports section did resolve the issue.

from ng-recaptcha.

DethAriel avatar DethAriel commented on July 27, 2024

Closing due to inactivity

from ng-recaptcha.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.