Calculate values canned responses
Moderator: mkoch227
Calculate values canned responses
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>
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>
Re: Calculate values canned responses
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 
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


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
Re: Calculate values canned responses
Thank you Klemen!
Another question
Where i can add at tinymce
extended_valid_elements : 'span',
Thanks!
Another question
Where i can add at tinymce
extended_valid_elements : 'span',
Thanks!
Re: Calculate values canned responses
You can adjust TinyMCE settings in /inc/tiny_mce/tinymce.inc.php
Open it in a powerful editor such as Notepad++
Open it in a powerful editor such as Notepad++
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
Re: Calculate values canned responses
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!
Finally the canned response with auto calculated values , pure html code are working

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!
Re: Calculate values canned responses
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.
Drag&drop attachments are coming in 2022.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
Re: Calculate values canned responses
Great news!
Another question
Tickets are saving with html entities.
Rich text editor is enabled for Staff only
example
<p>Eυχαριστώ πολύ..</p>
Thanks!
Another question
Tickets are saving with html entities.
Rich text editor is enabled for Staff only
example
<p>Eυχαριστώ πολύ..</p>
Thanks!
Re: Calculate values canned responses
You will need to disable entity encoding in TinyMCE to stop this:
https://www.tiny.cloud/docs/configure/c ... y_encoding
https://www.tiny.cloud/docs/configure/c ... y_encoding
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
Re: Calculate values canned responses
I had to change all 3 instances entity_encoding:"named" > entity_encoding:"raw" at tiny_mce.js
It is fine now!
It is fine now!
Re: Calculate values canned responses
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)
"<form><input ....."
There is a way to store and display the "clean" html at Hesk 2.8.2?
(Field messagehtml)
"<form oninput="x.value=a.valueAsNumber ..."
At Hesk 2.8.2 is stored at db different
(Field message)
"<form><input ....."
There is a way to store and display the "clean" html at Hesk 2.8.2?
Re: Calculate values canned responses
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.
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 
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


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