Edit Name entity

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ictpro
    Junior Member
    • Oct 2016
    • 4

    Edit Name entity

    Hello,
    Can I ask you for advice how to edit entity Contact -> "name" which is used in Contacts and by default is consisting of three fields Salutation + FirstName + Lastname?
    I have created two custom varchar fields Title1 and Title2 and I want to edit Name to be consting from Title1 + FirstName + Lastname + Title2.
    I tried to do this through both through Entitity Manager and Layout Manager but I haven't found way where to change that.

    Thanks ahead.
    Petr



  • tarasm
    Super Moderator
    • Mar 2014
    • 573

    #2
    You have to create a custom view for field (write a code) to achieve this. More details you can find in files client/src/views/fields/person-name.js and client/res/templates/fields/person-name/.
    Job Offers and Requests

    Comment

    • ictpro
      Junior Member
      • Oct 2016
      • 4

      #3
      Thank you tarasm

      Comment

      • MicKress
        Senior Member
        • Aug 2017
        • 105

        #4
        Hi, I wanted to generate „name“ with formalTitleName, salutationName, FirstName, MiddleName and LastName. In Detail view this fields should be shown as one name field (like salutationName, firstName and lastName do in the original version). I modified PersonName.json, person-name.js, edit.tpl and detail.tpl and stored them in a custom folder. Now I have a new type person-name when I want to generate new fields. When I create a new field from type person-name, you have in detail view only salutationName, FirstName and LastName with no entries. The other two fields are not shown. You can also not choose any entries in salutationName which is enum. Has anybody a solution for this? Thanks and regards Michael

        Comment

        • MicKress
          Senior Member
          • Aug 2017
          • 105

          #5
          Click image for larger version

Name:	1F052DC3-65B8-4A92-8D4B-E72CDCE9D441.jpeg
Views:	548
Size:	55.1 KB
ID:	45378 It looks like that. Original name field is connected with the fields, new person name not (see also no options).

          Comment

          • MicKress
            Senior Member
            • Aug 2017
            • 105

            #6
            @tarasm: when I create a new view, do I have to do this wirh a new name? In this case for example full-person-name.js? Or can i create a custom view with the regular name person-name.js?

            Comment

            • MicKress
              Senior Member
              • Aug 2017
              • 105

              #7
              Hi, the view with additional fields works now for person name.

              Comment

              • hi-ko
                Member
                • May 2015
                • 90

                #8
                MicKress: would you mind to share your results?

                Comment

                Working...