Setting Fields to Trigger the Copying of Text from One Field to Another - MKB 0112

    Follow

    In the example below, the provider is using Advanced AutoFill Menus (udf_Employees) to autofill data into the “Name” field on an Advanced ezMerge template.

    The script forces the data from the Name field on the Advanced ezMerge template into the Job Description field.
     
    Said another way, whenever there is a change to one of the fields below,  (mod_JobDescription) will be filled with the text found in udf_BusinessCard\\:Name

    - udf_Employees
    - udf_Employees1
    - udf_Employees2
    - udf_Employees21
    - udf_Employees211
    - udf_Employees2111
    - udf_BusinessCard\\:Name
     
    Here is the script – the fields that are bold can be replaced to fit your specific need:
     

    <script type="text/javascript"> 
    <!--
     
    $(document).ready(function(){
     
         function CopyTextToField() {

              $('#
    mod_JobDescription').val($('#udf_BusinessCard\\:Name').val());
         }

         $('#
    udf_Employees').bind('change', function(e) { setTimeout(function () { CopyTextToField (); }, 250); });
         $('#
    udf_Employees1').bind('change', function(e) { setTimeout(function () { CopyTextToField (); }, 250); });
         $('#
    udf_Employees2').bind('change', function(e) { setTimeout(function () { CopyTextToField (); }, 250); }); 
         $('#
    udf_Employees21').bind('change', function(e) { setTimeout(function () { CopyTextToField (); }, 250); });
         $('#
    udf_Employees211').bind('change', function(e) { setTimeout(function () { CopyTextToField (); }, 250); });
         $('#
    udf_Employees2111').bind('change', function(e) { setTimeout(function () { CopyTextToField (); }, 250); });
         $('#
    udf_BusinessCard\\:Name').bind('change', function(e) { CopyTextToField (); });
    });
     
    -->
     
    </script>

    Comments

    Powered by Zendesk