Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #24832

    I am using a contact form with one check box near the bottom, and would like the box to be checked by default, instead of unchecked by default. How do I do this??? Preferable just affecting one form, not all forms.

    Thank you!!!

    #124919

    Hi,

    Open framework > php > class-form-generator.php, find this code on line 243

    $this->elements_html .= '    <input '.$checked.' name="'.$id.'" class="input_checkbox '.$element_class.'" type="checkbox" id="'.$id.'" value="true"/><label for="'.$id.'">'.$element['label'].$required.'</label>';
    

    Replace it with:

    $this->elements_html .= '    <input checked="checked" '.$checked.' name="'.$id.'" class="input_checkbox '.$element_class.'" type="checkbox" id="'.$id.'" value="true"/><label for="'.$id.'">'.$element['label'].$required.'</label>';
    

    Regards,
    Ismael

    #124920

    Ah, that works great — thank you very much!!!!!!!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Contact Form — Check Box’ is closed to new replies.