Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 1 replies (of 1 total)
  • @davesumpter

    Participant

    Try this in the functions.php file of your child theme. I have put 777 as filed id but you will have to put in the correct field id and the correct field name:-

    function validate_required_profile_fields() {
    $required_fields = [
    ‘field_777’ => ‘The so and so field is required.’,
    ];

    foreach ( $required_fields as $field_key => $error_message ) {
    if ( empty( $_POST[ $field_key ] ) ) {
    bp_core_add_message( $error_message, ‘error’ );
    }
    }
    }
    add_action( ‘bp_signup_validate’, ‘validate_required_profile_fields’ );

Viewing 1 replies (of 1 total)
Skip to toolbar