- my $save_greeting = $self->{cv}->greeting
- && $::instance_conf->get_vc_greetings_use_textfield
- && SL::DB::Manager::Greeting->get_all_count(where => [description => $self->{cv}->greeting]) == 0;
+ my $save_greeting = $self->{cv}->greeting
+ && $::instance_conf->get_vc_greetings_use_textfield
+ && SL::DB::Manager::Greeting->get_all_count(where => [description => $self->{cv}->greeting]) == 0;
+
+ $self->{contact}->cp_title(trim($self->{contact}->cp_title));
+ my $save_contact_title = $self->{contact}->cp_title
+ && $::instance_conf->get_contact_titles_use_textfield
+ && SL::DB::Manager::ContactTitle->get_all_count(where => [description => $self->{contact}->cp_title]) == 0;