Hi JJ,
Thank you for using the plugin.It’s a great suggestion. Please allow me 2 working days to think a bit more about extending it(we can do it currently via code, I am going to explore a flexible option).
I will be writing back on Monday with a solution.
Regards
BrajeshHi JJ,
Thank you for the patience.Please upgrade to the latest version. Currently, I have left it to be done via code. Adding a UI option will need more thought(min/max and other conditions for each field).
Please put the following code in bp-custom.php and it will restrict 1000 characters.
add_filter( 'bpucf_form_validation_errors', function ( $errors ) { $message = isset( $_POST['message'] ) ? trim( wp_unslash( $_POST['message'] ) ) : ''; // let us put our conditions here. // is the length is greater than 1000, add error. if ( strlen( $message ) > 1000 ) { $errors->add( 'message', __( 'Message should have 1000 or less characters.' ) ); } return $errors; } );
Regards
BrajeshHi JJ,
Thank you.I sincerely appreciate you testing it. I am glad it worked.
Regards
Brajesh
The topic ‘ [Resolved] Buddypress User Contact Form Character Limit’ is closed to new replies.