From d578a04e0efb5a196cb1b9227c95000afb03446c Mon Sep 17 00:00:00 2001 From: sunil Date: Sat, 2 Apr 2016 15:00:18 +0530 Subject: [PATCH] check element contain display word, fix for CRM-18349 --- templates/CRM/Contribute/Form/Contribution/OnBehalfOf.tpl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/templates/CRM/Contribute/Form/Contribution/OnBehalfOf.tpl b/templates/CRM/Contribute/Form/Contribution/OnBehalfOf.tpl index 8b5eee6d35..09821c2d1d 100644 --- a/templates/CRM/Contribute/Form/Contribution/OnBehalfOf.tpl +++ b/templates/CRM/Contribute/Form/Contribution/OnBehalfOf.tpl @@ -264,7 +264,12 @@ function setLocationDetails(contactID , reset) { else { // do not set defaults to file type fields if (cj('#' + ele).attr('type') != 'file') { - cj('#' + ele ).val(data[ele].value).change(); + if (ele.split("_").pop() == 'display') { + cj("[id^='"+ele+"']").val(data[ele].value).change(); + } + else { + cj('#' + ele ).val(data[ele].value).change(); + } } } } -- 2.25.1