This might be the same as you are saying you don’t want – the user can press the submit, but it returns an error. As close as you’ll get without some js.
function rew_min_length ($reply_content) {
if (strlen($reply_content)<500) {
bbp_add_error( 'bbp_reply_content', __( '<strong>ERROR</strong>: Your reply must be at least 500 characters.', 'bbpress' ) );
}
return $reply_content ;
}
add_filter( 'bbp_new_reply_pre_content', 'rew_min_length' );
Thank you very much, but this is not what I need,
You and I were basically the same thing with different hooks.
However, we still have to send the request to check after pressing the submit button.
I don’t want that to happen.
I am looking for a solution to not show the submit button when it is not eligible.
I was thinking of javascript, however, it depends on the client. Any ideas in this direction?
Thank you.
sorry, well beyond free help, but in essence this is just an html form, so a bit of googling should let you create some js.