How can I change the Contact Title?

Can I use a logic_hooks before opening a Contact page to build the Contact Title depending of the data? Or I need to change the core file (even if it’s not recommended)?

The title is build with: Salutation Firstname Lastname

image

But depending of a checkbox, I need to see an other field as the title.