dimanche 5 mars 2017

how to capture the recaptcha response in ui

I have installed the ember-g-recaptcha addon in my ember app using ember install ember-g-recaptcha. I'm able to see the recaptcha in the UI. But how do I check whether that box is checked or not. If it's not checked my form should not submit and should display an error message.

I want to display this error message when the response is empty. I have written this in my controllers:

 onCaptchaExpired() { 
   $("#message").show();
   $("#message").css("color", "red");
   $("#message").html("Recaptcha response cannot be empty.");
 },




Aucun commentaire:

Enregistrer un commentaire