Calculate values canned responses

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
siomosp
Posts: 17
Joined: Tue Jun 04, 2013 3:59 pm

Calculate values canned responses

Post by siomosp »

Version of script: 2.8.2
Hosting company: stickit.gr
What terms did you try when SEARCHING for a solution: calculate


Hello!
There is a way to create a canned response witch calculate inputs
for example

<form oninput="x.value=parseInt(a.value)+parseInt(b.value)">
<input type="range" id="a" value="50">
+<input type="number" id="b" value="25">
=<output name="x" for="a b"></output>
</form>
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Calculate values canned responses

Post by Klemen »

Sorry, not something built-in. You'd have to custom-code it.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
siomosp
Posts: 17
Joined: Tue Jun 04, 2013 3:59 pm

Re: Calculate values canned responses

Post by siomosp »

Thank you Klemen!
Another question
Where i can add at tinymce
extended_valid_elements : 'span',
Thanks!
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Calculate values canned responses

Post by Klemen »

You can adjust TinyMCE settings in /inc/tiny_mce/tinymce.inc.php

Open it in a powerful editor such as Notepad++
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
siomosp
Posts: 17
Joined: Tue Jun 04, 2013 3:59 pm

Re: Calculate values canned responses

Post by siomosp »

Hi!
Finally the canned response with auto calculated values , pure html code are working :) , but only at 3.2.4
https://codepen.io/siomosp/pen/porEgxe
At production server i still use HESK 2.8.2 with mods for hesk
But, the auto calculated values are not working, maybe due to tinymce version? :(
I will continue to use 2.8.2 because of the drag and drop attachments
So there is a time table at Hesk 3.x for drag and drop attachments ?
( I have a Hesk license, it is possible to help me for fixing canned response auto calculations at current version?)
Thank you!
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Calculate values canned responses

Post by Klemen »

Not sure why your changes are not working in your MfH version. Sorry, but I cannot help with custom modifications to MfH.

Drag&drop attachments are coming in 2022.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
siomosp
Posts: 17
Joined: Tue Jun 04, 2013 3:59 pm

Re: Calculate values canned responses

Post by siomosp »

Great news!
Another question
Tickets are saving with html entities.
Rich text editor is enabled for Staff only
example
<p>E&upsilon;&chi;&alpha;&rho;&iota;&sigma;&tau;ώ &pi;&omicron;&lambda;ύ..</p>
Thanks!
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Calculate values canned responses

Post by Klemen »

You will need to disable entity encoding in TinyMCE to stop this:
https://www.tiny.cloud/docs/configure/c ... y_encoding
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
siomosp
Posts: 17
Joined: Tue Jun 04, 2013 3:59 pm

Re: Calculate values canned responses

Post by siomosp »

I had to change all 3 instances entity_encoding:"named" > entity_encoding:"raw" at tiny_mce.js
It is fine now!
siomosp
Posts: 17
Joined: Tue Jun 04, 2013 3:59 pm

Re: Calculate values canned responses

Post by siomosp »

At Hesk 3.2.4 b the html is stored at db "clean"
(Field messagehtml)
"<form oninput="x.value=a.valueAsNumber ..."
At Hesk 2.8.2 is stored at db different
(Field message)
"&lt;form&gt;&lt;input ....."
There is a way to store and display the "clean" html at Hesk 2.8.2?
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Calculate values canned responses

Post by Klemen »

That's probably because of the changes you did?

I strongly recommend not changing any of the settings unless you 100% know what you are doing, as you could be opening up your help desk vulnerable for XSS attacks.

Also note that in 3.2.4 message is saved twice - in message and message_html columns.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply