问题
Yeah. As the title says, I am tasked with creating custom field in user profile, and sort of hit a wall on this one. It is a very small customisation, add a yearly_target
field to user edit and detail view.
I was happy to stumble on this article to add a custom field in sugar.
Although it's a huge help, it seems to be missing one or 2 minor points.
To have the fields show in edit and detail views, one apparently needs to create and edits EditView.php
and EditView.tpl
and DetailView.php
and DetailView.tpl
, except I am not too sure where these files go. The yearly target field shows up in user list view, but not in edit/detail views. I tried custom/modules/Users
, custom/modules/Users/ext
, but changes made in the templates (static html changes) have no effect.
Anyone know where these files should go?
Thanks SO'ers!
回答1:
They should go in the custom/modules/Users/ directory. Do make sure you change the references inside the EditView.php and DetailView.php files to reference the templates you have in the custom/modules/Users/ directory instead of the default ones in the modules/Users/ directory.
来源:https://stackoverflow.com/questions/7924531/sugarcrm-6-2-adding-a-custom-field-in-user-profile