mecachisenros / cf-civicrm

Caldera Forms CiviCRM Integration
GNU Affero General Public License v3.0
30 stars 26 forks source link

Overwrite of logged in user #111

Closed KilakwaBT closed 5 years ago

KilakwaBT commented 5 years ago

I have a form that is can only be accessed by logged in users. It is designed to add resources to a group for a directory. When the user completes the form users contact record is changed. The name, data collected on the form and more importantly the contact type is changed. There is one processor which is setup to add the organization. The Auto Populate checkbox is not checked.

KilakwaBT commented 5 years ago

I added hidden fields for the first name, last name & email of the logged in contact and linked them to contact processor 1 with auto populate enabled. I switched the Org Contact to contact 2. This seems to have corrected the issue.

mecachisenros commented 5 years ago

@KilakwaBT if I understand correctly what you are saying is that the logged in user auto-populates the form regardless if the Auto Populate checkbox is enabled or not, and therefore overriding its own contact data?

mecachisenros commented 5 years ago

@KilakwaBT can you test latest dev branch including this commit 77d70ca75a32c4ec498e26d6c5c9bc93ae56e4b4?

KilakwaBT commented 5 years ago

@mecachisenros I just tested and the issue seems to be resolved in the latest dev branch

The issue was not quite that the form was auto populated but the logged in user was edited as opposed to a new contact being created. My quick fix turned out helpful as we added an activity so we knew when a logged in user added a new organization.

Thanks!!!