Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • @potatopotahto

    Participant

    After some experimentation, it seems the line add_action( 'bp_' . $fieldname . '_errors', function() use ( $error_message ) {echo apply_filters( 'bp_members_signup_error_message', "<div class=\"error\">" . $error_message . "</div>" );} ); gets called with both the phone number error, or any other default one, such as a mismatch between passwords.

    As such, this seems to look like the function in question. Is there any reason it would run and display a message for default errors, but do nothing visually for my custom one?

    @potatopotahto

    Participant

    invalid_number is an error that I created in the bp-custom.php class, not a built in one, do I have to do anything to have it show up as a popup or to move it to display over the text field?

    @potatopotahto

    Participant

    Where is it supposed to display the message?
    So do you have any recommendations or advice?

    @potatopotahto

    Participant

    do I have to use errors['invalid_number'] anywhere at all within any of the scripts?

    @potatopotahto

    Participant

    Hello, while I’ve gotten the site to fail a registration with an incorrect number using what you suggested above, it doesn’t display any error message of sorts. My line is: $bp->signup->errors['invalid_number'] = __( 'Please enter a valid phone number', 'buddypress' ); This is in my bp-custom.php class, in the function that gets added to the hook bp_signup_validate, when an incorrect phone number is determined. The site properly fails a registration with an incorrect number, while allowing registration with a correct one, but it doesn’t display any error pop up at all, even though I included an error message of sorts with the latter half of the line. Is this a code issue, or could this potentially be a theme issue? I’m using the Spacious theme if this helps

Viewing 5 replies - 1 through 5 (of 5 total)
Skip to toolbar