Answers.Body: <p>Based on testing on the demo server, it looks like custom contactRef fields <em>do</em> work when embedded in the "profiles" section of the contribution page, but fail to work properly when in the special "on behalf" profile. This looks like a bug.</p>
  
  <p>Can you please <a href="https://civicrm.org/bug-reporting" rel="nofollow">file an issue</a> in the bug tracker for this?</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-30T02:52:03.820Z
Answers.Text: Note: issue is https://issues.civicrm.org/jira/browse/CRM-16747 and fixed for 4.6.5.
Answers.UserDisplayName: Coleman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-23T19:39:37.000Z
Answers.LastActivityDate: 2015-06-23T19:39:37.000Z
Answers.UserDisplayName: Coleman
Answers.Body: <p>This may be due to the field's visibility. You may need to set it to public pages in the settings of the field in the profile (>>Administre CiviCRM >>Profiles >>Edit Profile Field). Here's a Screenshot:</p>
  
  <p><img src="https://i.sstatic.net/3VZvP.png" alt="Field Visibility"></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-22T15:45:29.120Z
Answers.Text: Thanks for your reply. Unfortunatelly, that's what it was already set as. I've tried all three values and I get the same result no mather which one I pick.
Answers.UserDisplayName: ATNPGO
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-22T15:37:38.163Z
Answers.LastActivityDate: 2015-06-22T15:37:38.163Z
Answers.UserDisplayName: Fabian
Answers.Body: <p>I tested this on a <a href="https://civicrm.org/demo" rel="nofollow noreferrer">demo site</a>, creating a custom contact reference field in a profile on a contribution page, like so:</p>
  
  <p><img src="https://i.sstatic.net/aWzr9.png" alt="enter image description here"></p>
  
  <p>I then visited that contribution page, and the field looked fine, and I was able to select a contact without any problem:</p>
  
  <p><img src="https://i.sstatic.net/zHyzH.png" alt="enter image description here"></p>
  
  <p>I suggest you check your browser's console for any javascript errors, and go through these <a href="http://forum.civicrm.org/index.php/topic,35850" rel="nofollow noreferrer">troubleshooting steps</a>. Also upgrade to the latest version of CiviCRM if you haven't done so already.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-23T11:56:31.037Z
Answers.Text: Thanks for your reply. Unfortunatelly, the browser console is empty and no relevent error messages are written server side either. Also, I am running the latest version of CiviCRM.
Answers.UserDisplayName: ATNPGO
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-23T12:16:25.447Z
Answers.Text: Hi again, I've recreated my issue on the drupal demo server. You can see the form [here](http://d46.demo.civicrm.org/civicrm/contribute/transact?reset=1&action=preview&id=4). If you check "I am contributing on behalf of an organization." the "Rep" field should be a contact reference field.
Answers.UserDisplayName: ATNPGO
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-22T20:07:45.297Z
Answers.LastActivityDate: 2015-06-22T20:07:45.297Z
Answers.UserDisplayName: Coleman
Answers.Body: <p>Unfortunately I don't believe that CiviCRM supports contact lookup fields on the profiles currently. If you use the Webform CiviCRM integration on the Drupal platform you can use the "existing contact" field to get this feature.</p>
  
  <p>Just be aware that in effect having a contact lookup field is exposing your data to a public form! </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-22T15:52:07.320Z
Answers.LastActivityDate: 2015-06-22T15:52:07.320Z
Answers.UserDisplayName: Jamie Novick - Compucorp
Body: <p>I am currently using an auto-complete field to indicate which member is representing which organisation. When I preview the field, either in the personalized fields or in the profile I am using it in, the field appears fine (see first image). However, when I use that profile in a contribution page, the field is only ever rendered as a textbox without any kind of auto-complete enabled (see image 2). Is there some kind of custom permission I need to set or is this simply a bug?</p>
  
  <p>Thank you</p>
  
  <p>Image 1: <img src="https://i.sstatic.net/xKKiM.png" alt="Working field when previewing the profile"></p>
  
  <p>Image 2: <img src="https://i.sstatic.net/4UMIA.png" alt="Non-working field when viewed from contribution page"></p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-06-22T15:34:31.203Z
Comments.Text: I don't think it's relevent, but CiviCRM is installed as a Drupal module.
Comments.UserDisplayName: ATNPGO
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-06-22T19:01:02.077Z
Comments.Text: Can you check your browser's console for JS errors?
Comments.UserDisplayName: Coleman
Tags: <custom-fields><contact-reference>
Title: How to use auto-complete reference field in a profile?
ThreadText: # How to use auto-complete reference field in a profile?
  
  (Asked by: username_0 on 2015-06-22)
  
  I am currently using an auto-complete field to indicate which member is representing which organisation. When I preview the field, either in the personalized fields or in the profile I am using it in, the field appears fine (see first image). However, when I use that profile in a contribution page, the field is only ever rendered as a textbox without any kind of auto-complete enabled (see image 2). Is there some kind of custom permission I need to set or is this simply a bug?
  
  Thank you
  
  Image 1: ![Working field when previewing the profile](https://i.sstatic.net/xKKiM.png)
  
  Image 2: ![Non-working field when viewed from contribution page](https://i.sstatic.net/4UMIA.png)
  
  **Tags:** custom-fields, contact-reference
  
  > **Comments:**
  > **username_0**: I don't think it's relevent, but CiviCRM is installed as a Drupal module.  
  > **username_1**: Can you check your browser's console for JS errors?  
  
  ---
  
  ## 4 answers
  
  ### Answer by username_1 on 2015-06-23. Score: 2 | Accepted answer
  
  Based on testing on the demo server, it looks like custom contactRef fields *do* work when embedded in the "profiles" section of the contribution page, but fail to work properly when in the special "on behalf" profile. This looks like a bug.
  
  Can you please [file an issue](https://civicrm.org/bug-reporting) in the bug tracker for this?
  
  > **Comments:**
  > **username_1**: Note: issue is https://issues.civicrm.org/jira/browse/CRM-16747 and fixed for 4.6.5.  
  
  ---
  
  ### Answer by username_2 on 2015-06-22. Score: 1
  
  This may be due to the field's visibility. You may need to set it to public pages in the settings of the field in the profile (>>Administre CiviCRM >>Profiles >>Edit Profile Field). Here's a Screenshot:
  
  ![Field Visibility](https://i.sstatic.net/3VZvP.png)
  
  > **Comments:**
  > **username_0**: Thanks for your reply. Unfortunatelly, that's what it was already set as. I've tried all three values and I get the same result no mather which one I pick.  
  
  ---
  
  ### Answer by username_1 on 2015-06-22. Score: 0
  
  I tested this on a [demo site](https://civicrm.org/demo), creating a custom contact reference field in a profile on a contribution page, like so:
  
  ![enter image description here](https://i.sstatic.net/aWzr9.png)
  
  I then visited that contribution page, and the field looked fine, and I was able to select a contact without any problem:
  
  ![enter image description here](https://i.sstatic.net/zHyzH.png)
  
  I suggest you check your browser's console for any javascript errors, and go through these [troubleshooting steps](http://forum.civicrm.org/index.php/topic,35850). Also upgrade to the latest version of CiviCRM if you haven't done so already.
  
  > **Comments:**
  > **username_0**: Thanks for your reply. Unfortunatelly, the browser console is empty and no relevent error messages are written server side either. Also, I am running the latest version of CiviCRM.  
  > **username_0**: Hi again, I've recreated my issue on the drupal demo server. You can see the form [here](http://d46.demo.civicrm.org/civicrm/contribute/transact?reset=1&action=preview&id=4). If you check "I am contributing on behalf of an organization." the "Rep" field should be a contact reference field.  
  
  ---
  
  ### Answer by username_3 on 2015-06-22. Score: 0
  
  Unfortunately I don't believe that CiviCRM supports contact lookup fields on the profiles currently. If you use the Webform CiviCRM integration on the Drupal platform you can use the "existing contact" field to get this feature.
  
  Just be aware that in effect having a contact lookup field is exposing your data to a public form!
  
  
  ---
  
  