Name format for contacts in custom module

Is it possible to change name format (first and last name position) in contact field for custom module?

Name format for standart modules I can change in Setting and in Profile.
But this changes do not apply to custom module which I create in Module Builder. Every time name format look like ā€œf lā€.


Thanks for your help