Validation not working for some form elements

Home Forums Quform PHP Validation not working for some form elements

This topic is: not resolved

This topic contains 5 replies, has 2 voices, and was last updated by  Ally 2 weeks, 4 days ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #25811

    sc688hshj
    Participant

    I am using Quform for a clients website and need to add a checkbox to ensure that visitors agree to teh clients terms and privacy statement. All of the main form elements are working, however, teh checkbox and reCaptcha are not validating.

    I have added teh following to the contact.php page for teh client:

    <div class=”form-group”>
    <div class=”col-md-4″></div>
    div class=”col-md-6″>
    <label for=”single_checkbox”><input id=”single_checkbox” name=”single_checkbox” value=”1″ type=”checkbox” /> <span style=”font-size: 14px !important; “>I agree with Mosaic Project Services Pty. Ltd.Disclaimer and Privacy Policy</span> <span class=”quform-required”>*</span></label>
    </div>
    </div>

    <div class=”form-group”>
    <div class=”col-md-4″>
    </div>
    <div class=”col-md-6″>
    <div class=”g-recaptcha” data-sitekey=”6LfTZi0UAAAAAKbTYAZkr-4govs0nDuPVHXxxowb”></div>
    </div>
    </div>

    I have also added the following to process.php
    /**
    * Configure the enquiry type element
    * Filters: Trim
    * Validators: Required
    */

    $single_checkbox = new Quform_Element(‘single_checkbox’, ‘Checkbox’);
    $single_checkbox->addValidator(‘required’);
    $form->addElement($single_checkbox);

    /**
    * Configure the Google reCaptcha element
    * Filters: Trim
    * Validators: Required, Identical
    */

    $recaptcha = new Quform_Element(‘g-recaptcha-response’, ‘reCAPTCHA’);
    $recaptcha->addValidator(‘required’);
    $recaptcha->addValidator(‘recaptcha’, array(‘secretKey’ => ‘6LfTZi0UAAAAAKDTvz7Xd3GtJNwtQ32e2w9A09TW’));
    $recaptcha->setIsHidden(true);
    $form->addElement($recaptcha);

    I am not sure if has an impact but the form is being sent through mailgun.org.

    On another note, I just tried downloading teh latest version of QuForm and the zip file does not contain the form files. It only contains teh documentation, resources and template.

    Thanks,

    Stuart

    #25812

    sc688hshj
    Participant

    Thanks

    #25850

    sc688hshj
    Participant

    Any updates for this? I have not had any response and can’t find any information in your support documentation or forum.

    #25862

    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.

    #25873

    sc688hshj
    Participant

    Hi Ali,

    I have just sent an email to you.

    #25910

    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 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.