Unable to remove "maxlength" and "minlength" requirements


Home Forums Front End PM PRO Unable to remove "maxlength" and "minlength" requirements

This topic is: Resolved
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #14623
    Utsav Sarkar
    Participant

    I am facing the problems below:

    1) Whenever someone tries to send a message less than 10 characters, the plugin gives an error message.
    2) Whenever the subject is more than 100 chanraters, the plugin gives an error message.

    I followed the steps in this tutorial: https://www.shamimsplugins.com/support/forum/front-end-pm-pro/

    However, I was still unable to remove these maxlength and minlength requirements. How can I fix this?

    #14637
    Shamim Hasan
    Keymaster

    To remove minlength and maxlength from both message title and message content add following code in your theme’s (child theme’s if any) functions.php

    add_filter( 'fep_form_fields', function( $fields ){
        unset( $fields['message_title']['minlength'], $fields['message_title']['maxlength'], $fields['message_content']['minlength'], $fields['message_content']['maxlength'] );
        return $fields;
    });
    #14678
    Utsav Sarkar
    Participant

    thank you that worked

    #16910
    Utsav Sarkar
    Participant

    This is not working after the version 10 update

    #16915
    Shamim Hasan
    Keymaster

    This one also tested and working.
    Please make sure your code is in right place ( in your theme’s (child theme’s if any and active) functions.php )

    Let me know.

Viewing 5 posts - 1 through 5 (of 5 total)

You need to purchase ‘Front End PM PRO’ to create topic in this support forum.

If you already purchased ‘Front End PM PRO’ please LOGIN.