13

I set up a Webform for a Membership Application. I followed the instructions on this page for setting up an Autocomplete for the Organization the new Member belongs to:

http://wiki.civicrm.org/confluence/display/CRMDOC/Webform+CiviCRM+Integration#WebformCiviCRMIntegration-CurrentEmployer

This works fine when I am logged in (as an administrator), and it auto completes the organization name with options from the database.

But when I test the form when I'm logged out, it doesn't recognize any organization names that I know are in the CiviCRM. Furthermore, when I try to add a new organization it doesn't get added to the database.

Any ideas why this might be happening?

  • Heh Christopher, you should ask or answer more questions to add to your reputation, since that will help the CiviCRM StackExchange proposal once you get to 200+ points. – Joe Murray Nov 19 '14 at 22:25
10

The anonymous user does not have permission to view contacts in your database. Be thankful for this default, it can save you from accidentally exposing your entire database to the world!

You can override this default by editing the "existing contact" field (from the webform tab) and unticking "Enforce Permissions". Typically you would also set one or more filters on that form (e.g. pick a group) to limit the autocomplete to just the organizations you want to expose.

  • 1
    Thanks. The idea with the Membership Application is that new applicants for membership can see, as they enter their organization, if their organization is already part of the database. Is there a danger to exposing all the organizations? Wouldn't it just be the organizations' names? – Christopher Dunning Nov 17 '14 at 12:13
  • 2
    Yes it would just be the names (unless you are exposing other organization fields to the webform). I think the danger of not restricting it in some way is that if, in the future, you started using your db to store the names of organizations that you don't want exposed, you might not remember about this webform. Not a huge risk admittedly but good to always think through your access control and make sure you don't leave loopholes lying around. – Coleman Nov 17 '14 at 18:36
  • Just as a note for anyone still running into the problem with autocompleted organizations not getting saved in CiviCRM, it was necessary to set the type of hidden field of the organization name to "Hidden element" rather than "Secure value" – Markus Forsberg Apr 4 '16 at 13:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.