Reply To: Add custom field to profile general settings and save it
You were clear enough about it being settings – I misread your posts.
You should use this hook: do_action( 'bp_core_general_settings_after_save' );
Found in: buddypress\bp-settings\bp-settings-actions.php
Changing the feedback message is more difficult.
You could change the content of the message by using this hook:
apply_filters( 'bp_core_render_message_content', $bp->template_message, $type );
Found in: buddypress\bp-core\bp-core-functions.php
But I don’t see how you can change the type of message from error to success.
So what I would do is – create a new tab on the Settings panel and handle everything separate from the General tab functionality.
There is lots of documentation about that task, this will get you started…
function had_setup_biz_phone_navigation() {
bp_core_new_subnav_item( array(
'name' => 'Billing Phone',
'slug' => 'bphone',
'parent_url' => bp_loggedin_user_domain() . 'settings/',
'parent_slug' => 'settings',
'screen_function' => 'name of the function to create the content',
'show_for_displayed_user' => false
) );
}
add_action( 'bp_setup_nav', 'had_setup_biz_phone_navigation' );