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

    Hi all,
    can somebody tell me, where I can limit the number of characters allowed in the contact form fields, in particular the text area? Couldn’t find a hint in the documentation…

    Thanks for your help!

    #1102951

    Hey tjoerger,

    The textarea in the contact form doesn’t have a maxlength attribute so it should be unlimited based on https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea

    maxlength
    The maximum number of characters (unicode code points) that the user can enter. If this value isn’t specified, the user can enter an unlimited number of characters.

    I hope this helps.

    Best regards,
    Nikko

    #1102957

    Hi Nikko,
    thank you, that’s what I thought. My question is where I can find the respective file in enfold in order to add the “maxlength” attribute.

    Thanks,
    Thomas

    #1103145

    Hi Thomas,

    I see, you can find it in wp-content > themes > enfold > framework > php > class-form-generator.php and look for this code (line 683 in Enfold 4.5.7):

    $this->elements_html .= '	 <textarea '.$placeholder.' name="'.$id.'" class="text_area '.$element_class.'" cols="40" rows="7" id="'.$id.'" >'.$value.'</textarea>';

    Best regards,
    Nikko

    #1103277

    Thank you, Nikko, found it with your help.

    Best regards,
    Thomas

    #1103316

    Hi Thomas,

    Great! We’re glad that we could help :)
    Thanks for using Enfold and have a great day!

    Best regards,
    Nikko

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Enfold contact form: how to limit number of characters’ is closed to new replies.