Hello, I am trying to add an extra line to address field. Came across this post: http://forum.espocrm.com/forum/gener...d-to-addresses, it did not work for me though. Could anyone help?
Announcement
Collapse
No announcement yet.
adding an extra line to address field
Collapse
X
-
Hello,
I tried creating the file custom/Espo/Custom/Resources/metadata/fields/address.json and client/custom/src/views/fields/address.js.
For step 3, I am not sure what I should do. Do I copy the two .tpl files from client/res/templates/fields/address/ to client/custom/res/templates/fields/address/?
Comment
-
Being an inexperienced developer, I'm sorry if I'm asking the obvious...
Let me first write out all the steps I took, and please correct me if I did something wrong!
GOAL: to add an extra line above the current "Street" row
1. Create a file "address.json" under the path custom/Espo/Custom/Resources/metadata/fields/address.json, with the following code:
Code:[COLOR=#000000][COLOR=#007700]{ [/COLOR][COLOR=#DD0000]"view"[/COLOR][COLOR=#007700]: [/COLOR][COLOR=#DD0000]"Custom:Fields.Address"[/COLOR] [COLOR=#007700]} [/COLOR][/COLOR]
Code:[COLOR=#000000][COLOR=#0000BB]Espo[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000BB]define[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]'Custom:Views.Fields.Address'[/COLOR][COLOR=#007700], [/COLOR][COLOR=#DD0000]'Views.Fields.Address'[/COLOR][COLOR=#007700], function ([/COLOR][COLOR=#0000BB]Dep[/COLOR][COLOR=#007700]) { [/COLOR][COLOR=#0000BB]detailTemplate[/COLOR][COLOR=#007700]: [/COLOR][COLOR=#DD0000]'custom:fields.address.detail'[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]editTemplate[/COLOR][COLOR=#007700]: [/COLOR][COLOR=#DD0000]'custom:fields.address.edit'[/COLOR][COLOR=#007700], ... [/COLOR][COLOR=#0000BB]OVERRIDEN METHODS [/COLOR][COLOR=#007700]... }); [/COLOR][/COLOR]
After doing that, I can't see any new option that allow me to customise the address field from the cPanel.
Comment
Comment