Try ERPNext Try Frappe Cloud Buy Support Partners Foundation

EMAIL Signature with HTML

We need to add hyperlinks and images to our email signatures. is this possible??

In ERP we have

But we need it to look like this

image

There’s an elaborate method to achieve something like that which is as follows -

Property Setter add this -

Custom Field add this -

Custom Script add this -

Now go to your User’s master, you should be able to see something like this -

You can achieve the html formatting through the editor and the custom script should take care of swapping the value to original field.

2 Likes

Thanks for the reply

The first two stages work fine. but the custom script is not swapping the old text signature for the new html one

Just a thought. We are on erpnext hosted cloud version. Can we use custom scripts with their hosting plan?

Custom Javascripts can be added like this one.

So any other reason why the code will not work?

I am sure it is exactly as given, and I have cleared the cache

frappe.ui.form.on(‘User’,{
validate: function(frm) {
frm.doc.email_signature = frm.doc.signature_email;
}
})

The fieldtype of Email Signature should be changed to TextEditor in the core product.

Tried that first, but not possible

we get this message

Fieldtype cannot be changed from Small Text to Text Editor in row 38

This will not be possible at the client side. We will have to incorporate this change in the core product itself.

So, this is not possible then - even with the script as shown above?

The above script will do it since it is a Custom Field + Script.

My reply was in regards to :

But the script does not work either

Just noticed this error report when I go to My Settings

relevant?

SyntaxError: Invalid or unexpected token
at Class.setup (https://graphskill-erp.erpnext.com/assets/js/form.min.js?ver=1529658423.0:2691:18)
at _f.Frm.setup (https://graphskill-erp.erpnext.com/assets/js/form.min.js?ver=1529658423.0:172:22)
at _f.Frm.refresh (https://graphskill-erp.erpnext.com/assets/js/form.min.js?ver=1529658423.0:446:9)
at Class.load (https://graphskill-erp.erpnext.com/assets/js/form.min.js?ver=1529658423.0:87:33)
at https://graphskill-erp.erpnext.com/assets/js/form.min.js?ver=1529658423.0:82:7
at Object.callback (https://graphskill-erp.erpnext.com/assets/js/desk.min.js?ver=1529658423.0:5516:6)
at Object.callback [as success_callback] (https://graphskill-erp.erpnext.com/assets/js/desk.min.js?ver=1529658423.0:1437:16)
at _ (https://graphskill-erp.erpnext.com/assets/js/desk.min.js?ver=1529658423.0:1461:34)
at Object. (https://graphskill-erp.erpnext.com/assets/js/desk.min.js?ver=1529658423.0:1562:5)
at i (https://graphskill-erp.erpnext.com/assets/frappe/js/lib/jquery/jquery.min.js:2:27151)

Report this to the support team.

I have, they say the error is not a core bug, so the problem lies with the script

Ah well, thanks everyone for trying. Looks like we stick with the default text signatures for now

Hello Ron

We do use a generic html sig and a simple text section for each individual thus providing what you require.

I don’t have access at the moment to my server but it is possible out of the box. Signatures are setup in a court of places. I think I set up my html from the email account instead of the individual users.

I’ll take a look tomorrow and see if I can give you more detail

any update ?

regards
HARSHAL NIRMAL

1 Like

Hi,
Kindly update if we can add html code or file as a signature.

In v12 (and likely in v13) there is an editor. Go to Desk > Settings > Email Account and scroll down to “Add Signature”.

Thanks for the reply. But I cannot put html code.

The Email Signature field in User supports HTML.