Announcement

Collapse
No announcement yet.

Override email click in lead from extension

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Override email click in lead from extension

    I would like to create a simple extension where I override what happens when a user clicks on the email field.

    How to structure the extension to achieve this? It seems nothing is working even if I put the changes into:

    \files\client\modules\my-extension\src\views\fields\email.js

    And changed the data action to something else:

    'click [data-action="mailTo"]': function (e) {
    //something else
    },

    Any help would be appreciated.

  • #2
    Hello,

    did you set this view in the field metadata?
    The single street address field provided by default is not adequate for our addressing needs so I'm looking to add a second street address field. It's easy

    Comment


    • #3
      Originally posted by tanya View Post
      Hello,

      did you set this view in the field metadata?
      https://forum.espocrm.com/forum/gene...d-to-addresses
      Thank you, one more question.

      Currently I override the whole address.js file and added only a small portion, the above mentioned click event so I override everything but I don't want that.
      I want to add only that small above mentioned click event so if the system is upgraded I wont have to upgrade my extension.

      The same is true for the address.json file. I had to put everything there from the original file. Is it possible to override only the view which is pointing to my custom js file that contains only the click event?

      And also one more ask, could you please check my other question?
      I would like to create a simple extension where I can put some simple javascript code that will run on page load. How to create the folder structure for it? I currently put my file here: files/client/modules/mymodulename/lib/mylib.js And configured here to load it up: files/application/Espo/Modules/mymodulename/Resources/meta

      Comment

      Working...
      X