Hi!
Currently I have my customer form (customer.pl) working perfectly, but due to a new functionality that I implement I need to assign a validation when submitting the form.
My form has the option to choose the priority enabled. The problem is that users choose priority number 5 for any reason, that is why I need to show a popup when the form is sent warning that the user has chosen level 5 priority and if he is sure to continue.
How can I enable a confirmation popup?
Many thanks
Cheers
Enable warning popup before submitting form?
Moderator: crythias
-
- Znuny superhero
- Posts: 914
- Joined: 15 Dec 2016, 15:13
- Znuny Version: All
- Real Name: Emin
- Company: Efflux GmbH
- Contact:
Re: Enable warning popup before submitting form?
Hey,
You'll need to create a new JavaScript file for the customer interface and write a couple of lines.
Let me know if you need more help.
Best regards
Emin
You'll need to create a new JavaScript file for the customer interface and write a couple of lines.
Let me know if you need more help.
Best regards
Emin
Professional Znuny and OTRS services: efflux.de | efflux.de/en/
Free and premium add-ons: German | English
Free and premium add-ons: German | English
Re: Enable warning popup before submitting form?
Many thanks zzz

I need create a js file and then include into CutomerTicketMessage.tt?
Where can i found examples?.
Cheers
-
- Znuny superhero
- Posts: 658
- Joined: 24 Feb 2012, 03:58
- Znuny Version: LTS and Features
- Real Name: Mo Azfar
- Location: Kuala Lumpur, MY
- Contact:
Re: Enable warning popup before submitting form?
not soo clean way..direct javascript on CustomerTicketMessage.tt
at submit button, enable onclick event.
at end of file,
at submit button, enable onclick event.
Code: Select all
onclick="clicked(event)"
Code: Select all
<script>
function clicked(e)
{
var priority = document.getElementById("PriorityID");
var priority2 = priority.options[priority.selectedIndex].text;
if(!confirm('You are selecting priority '+priority2+'. Confirm Submit?'))e.preventDefault();
}
</script>
My Github
OTRS CE/LTS Discord Channel
Cant Update Package Anymore ? Check This
Professional OTRS, Znuny & OTOBO services: efflux.de/en
Free and premium add-ons: English
OTRS CE/LTS Discord Channel
Cant Update Package Anymore ? Check This
Professional OTRS, Znuny & OTOBO services: efflux.de/en
Free and premium add-ons: English
Re: Enable warning popup before submitting form?
skullz wrote: ↑05 May 2020, 20:23 not soo clean way..direct javascript on CustomerTicketMessage.tt
at submit button, enable onclick event.
at end of file,Code: Select all
onclick="clicked(event)"
Code: Select all
<script> function clicked(e) { var priority = document.getElementById("PriorityID"); var priority2 = priority.options[priority.selectedIndex].text; if(!confirm('You are selecting priority '+priority2+'. Confirm Submit?'))e.preventDefault(); } </script>
Many thanks skullz, is exactly that i need, also i put this code on my CustomerTicketMessage.tt and works!.
It is true that it is not the cleanest way to implement this function, but the important thing is that it works perfectly. I tought that to implement a popup on .tt file was more complicated and not very similar with a normal HTML.
I am very grateful for the help.
Thanks skullz/zzz
Cheers
Re: Enable warning popup before submitting form?
Hi,
usually you can use SLA field for this and set a popup here.
Flo
usually you can use SLA field for this and set a popup here.
Flo
OTRS 2025 SILVER (Prod)
OTRS 2025 auf Debian 12 (Test)
Znuny 7.x latest version testing auf Debian 12
-- Ich beantworte keine Forums-Fragen PN - No PN please
I won't answer to unfriendly users any more. A greeting and regards are just polite.
OTRS 2025 auf Debian 12 (Test)
Znuny 7.x latest version testing auf Debian 12
-- Ich beantworte keine Forums-Fragen PN - No PN please
I won't answer to unfriendly users any more. A greeting and regards are just polite.