Skip to content

Commit

Permalink
fixed recaptcha varfication issue
Browse files Browse the repository at this point in the history
  • Loading branch information
zubairraeen committed Dec 27, 2023
1 parent 4ca539d commit cf15df5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/qsm-quiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ function qmnValidation(element, quiz_form_id) {
//Google recaptcha validation
if (jQuery(this).attr('class').indexOf('g-recaptcha-response') > -1) {
let recaptcha_id = jQuery(this).attr('id');
let recaptcha_index = recaptcha_id.replace("g-recaptcha-response-", "");
let recaptcha_index = 'g-recaptcha-response' === recaptcha_id ? 0 : recaptcha_id.replace("g-recaptcha-response-", "");
if (grecaptcha.getResponse(recaptcha_index) == "") {
alert(error_messages.recaptcha_error_text);
show_result_validation = false;
Expand Down

0 comments on commit cf15df5

Please sign in to comment.