Set Queue, Body via Javascript in AgentTicketPhone

Moderator: crythias

Post Reply
tomp
OTRS newbie
Posts: 7
Joined: 29 Aug 2018, 11:04
OTRS Version?: 6.0.8

Set Queue, Body via Javascript in AgentTicketPhone

Post by tomp » 19 Sep 2018, 13:11

Hi, I'm trying to fill input fields (Body, Queue...) via javascript (basically like the template button hidden field templates but without submitting the form). It works for Subject but Body and Queue don't seem to change.

I tried:

Code: Select all

$('#Dest').val('3||queuename');
$('#Dest').val('3||queuename').change();

$('#Body').val('text');
$('#RichText').val('text');
$('#RichText').val('text').change();
Core.AJAX.UpdateTextarea($('#RichText'), 'test');
Core.AJAX.UpdateTextarea($('#Body'), 'test');
document.compose.RichText.value = 'test';
document.compose.Body.value = 'text';
Ideally without submitting the form, if possible?

Also, does setting the recipient via $('ToCustomer').val('email@host.tld'); and $('CcCustomer').val('email@host.tld'); work the way I think it does?

Thank you

Post Reply