2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
5 | This work is published under the GNU AGPLv3 license with some |
6 | permitted exceptions and without any warranty. For full license |
7 | and copyright information, see https://civicrm.org/licensing |
8 +--------------------------------------------------------------------+
10 {assign var="customGreeting" value=$n|cat:"_custom"}
11 <span>{$form.$n.html|crmAddClass:big}</span> <span id="{$customGreeting}_html" class="hiddenElement">{$form.$customGreeting.html|crmAddClass:big}</span>
13 <script type="text/javascript">
14 var fieldName = {$n|@json_encode};
16 cj( "#" + fieldName ).change( function( ) {
17 var fldName = cj(this).attr( 'id' );
18 showCustom( fldName, cj(this).val( ) );
21 showCustom( fieldName, cj( "#" + fieldName ).val( ) );
22 function showCustom( fldName, value ) {
24 cj( "#" + fldName + "_custom_html").show( );
26 cj( "#" + fldName + "_custom_html").hide( );
27 cj( "#" + fldName + "_custom" ).val('');