Submitting the form gives ‘type_the_word’ does not exist error

Home Forums Quform PHP Submitting the form gives ‘type_the_word’ does not exist error

This topic is: not resolved
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #29217
    DigitalEssence
    Participant

    Hi,

    I’ve removed the default Captcha and have added a Google reCAPTCHA instead but when i submit the form I get a Warning pop up that says:

    ” Element ‘type_the_word’ does not exist in the HTML but is being validated, you must also remove the element configuration from process.php”

    If I remove the relevant lines from process.php I can no longer submit the form even when the reCAPTCHA has been completed.

    /**
    * Configure the CAPTCHA element
    * Filters: Trim
    * Validators: Required, Identical
    */
    $captcha = new Quform_Element(‘type_the_word’, ‘Type the word’);
    $captcha->addFilter(‘trim’);
    $captcha->addValidator(‘required’);
    $captcha->addValidator(‘identical’, array(‘token’ => ‘catch’));
    $captcha->setIsHidden(true);
    $form->addElement($captcha);

    /** Google reCAPTCHA **/
    $recaptcha = new Quform_Element(‘g-recaptcha-response’, ‘reCAPTCHA’);
    $recaptcha->addValidator(‘required’);
    $recaptcha->addValidator(‘recaptcha’, array(‘secretKey’ => ‘My site key goes here’));
    $recaptcha->setIsHidden(true);
    $form->addElement($recaptcha);

    And my form html:

    <!– Begin Captcha element –>
    <div class=”quform-element quform-element-recaptcha”>
    <div class=”quform-spacer”>
    <label>Are you human? <span class=”quform-required”>*</span></label>
    <div class=”quform-input”>
    <div class=”g-recaptcha” data-sitekey=”6LfpOKIUAAAAAPp6S1huUuTlhfBlQ-4hx6446-mr”></div>
    <noscript>Please enable JavaScript to submit this form.</noscript>
    </div>
    </div>
    </div>
    <!– End Captcha element –>

    Thanks

    #29253
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy