From 60039edd1cf18186a089bb70603758f97fbc7410 Mon Sep 17 00:00:00 2001 From: Pratik Joshi Date: Fri, 9 Aug 2013 19:53:12 +0530 Subject: [PATCH] CRM-13143 contact reference field issue fix : the referencing for customIdObj was incorrect i.e. it was refering to corrupt element object, thus 'id' value was not getting stored in the correct element object so the formRule error was thrown of 'Invalid Contact ...' as the submission required numeric id --- templates/CRM/Custom/Form/ContactReference.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/CRM/Custom/Form/ContactReference.tpl b/templates/CRM/Custom/Form/ContactReference.tpl index e1ba1557cc..d30ff53c60 100644 --- a/templates/CRM/Custom/Form/ContactReference.tpl +++ b/templates/CRM/Custom/Form/ContactReference.tpl @@ -37,8 +37,8 @@ cj( function( ) { customObj.autocomplete( url, { width : 250, selectFirst : false, elementId: custom, matchContains: true, formatResult: {/literal}validate{$element_name|replace:']':''|replace:'[':'_'|replace:'-':'_'}{literal} }).result( - function(event, data ) { - customIdObj.val( data[1] ); + function(event, data) { + cj(custom_id).val(data[1]); } ); customObj.click( function( ) { -- 2.25.1