CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • enable autocomplete fields on Survey interview
Pages: [1]

Author Topic: enable autocomplete fields on Survey interview  (Read 1013 times)

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
enable autocomplete fields on Survey interview
June 22, 2011, 04:57:20 am
I can see

CRM_Campaign_BAO_Survey
line 883 disables Autocomplete custom fields in the profiles on interviews & I can re-enable them but they aren't autocomplete - any pointers as to how to get them up & running as autocomplete fields? Where should I should I start?
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: enable autocomplete fields on Survey interview
June 22, 2011, 06:01:22 am
Hi,

The survey is a ajax form, right ?

So it means that having the initialisation in the normal cj(function(){...} won't work because the form isn't loaded when it runs.

You will need to either re-run the init of the autocomplete after the form loads, or use the live() method.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: enable autocomplete fields on Survey interview
June 23, 2011, 04:04:49 am
I'm going to need to corner you for a bit more help on this on - the form is the one when you go to

http://drupal.demo.civicrm.org/civicrm/survey/search?sid=1&reset=1&op=interview&force=1

& click 'go'
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: enable autocomplete fields on Survey interview
July 10, 2011, 05:10:40 pm
So, the problem turned out to be to do with the field name / id & it affects on behalf of profiles as well as surveys. I came up with a working patch but once I realised the issue was broader I came to suspect that my patch wasn't the best approach as it's more of a hack really. (autocomplete expects one format, format is not set to that in the first place, my patch nips in & changes it )

http://issues.civicrm.org/jira/browse/CRM-8468
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • enable autocomplete fields on Survey interview

This forum was archived on 2017-11-26.