Freetext help

Moderator: crythias

Locked
malamaur
Znuny newbie
Posts: 1
Joined: 29 Aug 2013, 11:33
Znuny Version: 3.2.9
Real Name: Maurizio Malagoli
Company: UTdA

Freetext help

Post by malamaur »

Hi everyone,
first I create the dynamic fiel named "Scuola" and then in my CustomerTicketMessage.dtl I've copied this code:

Code: Select all

<script type="text/javascript">//<![CDATA[
    
	function nonetext() {
   		document.compose.Subject.value = "";
   		document.compose.RichText.value = "";
   		document.getElementById('DynamicField_Scuola').style.display = 'none';
   		document.getElementById('LabelDynamicField_Scuola').style.display = 'none';
	}
    $('#Dest').bind('change', function (Event) {
        Core.AJAX.FormUpdate($('#NewCustomerTicket'), 'AJAXUpdate', 'Dest', ['TypeID', 'PriorityID', 'ServiceID', 'SLAID', $Data{"DynamicFieldNamesStrg"}]);
	switch ($('#Dest').val() ) { 
    	case  "3\|\|Junk": // need to slash escape the pipes
    		  nonetext();
     			document.getElementById('DynamicField_Scuola').style.display = 'block';
      			document.getElementById('LabelDynamicField_Scuola').style.display = 'block';
      			document.getElementById('LabelDynamicField_Scuola').className = 'Mandatory';
      			document.getElementById('DynamicField_Scuola').className = 'TicketFreeText  Validate_RequiredDropdown ServerError';
   		break;
   
    default:
      nonetext();
}
    });        
//]]></script>
<!--dtl:js_on_document_complete-->
<!-- dtl:block:Queue -->
if i Select the queue Junk nothing append. Where is the problem?
Probably the OTRS version (3.2.9)?

Thank you

maurizio
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Freetext help

Post by crythias »

Did you enable the field in SysConfig? Would it show if you didn't have the code change?
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Locked