1

Is it currently possible to allow users to submit custom data multiple times and store each submission separately? I've tried a few things with no success. Searching suggests this has come up before but there's no complete solution. Just want to confirm I'm not missing something before I give up.

Note that this application is in Joomla. I inherited this and cannot change at this time. Current Civi version is 5.64.4 which I know needs to be upgraded.

Goals:

  • Anonymous user submits a form which contains both user info (name, email etc.) and custom fields.
  • User can submit the form more than once. Typically this happens once every few months.
  • Custom field info retained for each submission separately - ideally with date of submission.
  • User info updated to the most recent using de-dupe rules.
  • User and Admin user get confirmation email after each submission.
  • Administrative user can export submissions from all users.

First attempt: Tab with table - New set of custom fields. "Tab with table" style. New profile for this set of fields and some contact info, and then "Use Create" mode.

Seems like it will work. Form is available, submitted data looks right on the tab. Unfortunately, the confirmation email always sends the info from the first submittal, not the most recent one. Export works kind of, but no date of submission. Upon further reading Tab with table isn't really a separate record for each submission which I think is creating the confirmation email issue.

Second attempt: Activities - New activity type, New set of custom fields for an activity of that type, new profile with those fields and user fields Unfortunately, form with mixed fields can't be used in create mode. (I also tried creating a form with FormBuilder, but that seems to have the same challenge.)

Third attempt: Cases - Basically same as Activities. There doesn't seem to be a way to expose a form to anonymous users. Even with just one field (not even a custom field, just case subject) I get "Profile search, view and edit are not supported for Profiles which include fields for more than one record type." which I think is a misleading error but regardless it doesn't work. Unless maybe it's a permissions problem? I've tried changing permissions but no luck.

Fourth attempt: Pretend this is an event - New participant type, New set of custom fields for participant of that type. New event, allow multiple registrants to the event from the same email. I believe this will work, but it would require me to modify the confirmation emails and front end screens to hide that I'm hijacking the event functionality. Seems like a lot of work, which has me wondering if there's a better way.

3

1 Answer 1

1

I had a go at building in FB and it worked for me as expected to 'add activity'

there is a short-lived example here https://dmaster.demo.civicrm.org/civicrm/admin/afform#/create/form/Individual

maybe gives you some clues?

enter image description here

10
  • Interesting. Thank you for giving me hope! I will try again. When I did this exact thing (but used only one activity 1 field), when I went to the form, I got "Profile search, view and edit are not supported for Profiles which include fields for more than one record type." I wonder if it could be something else, maybe a permissions error, or something wrong with my Joomla link? Hmm. I'll keep trying.
    – ASav
    Commented Jul 11 at 1:27
  • I don't see any reason why making an FB would land you on a page about Profiles. pls add some screenshots to your original qustion. when you make an FB at top right (once you have given it a 'path') you should find a link to 'View Page'. what type of url is that giving you?
    – petednz - fuzion
    Commented Jul 11 at 21:44
  • Thanks so much Peter, sorry I didn't respond for so long. I was away for a bit. This was super helpful and gave me a nudge in the right direction. The good news is that I can now add a contact and activity through a formbuilder form hurray! But I'm having two pretty significant issues. Any chance you can point me in the right direction on these? adding each as a separate comment below.
    – ASav
    Commented Jul 27 at 16:26
  • Issue #2: I can't add rich text to the form. I can add the richtext control and edit the text, but the "done" button doesn't do anything and I see an error in the console when I click done. TypeError: Cannot read properties of undefined (reading 'hasClass') at CRM.wysiwyg.getVal (crm.summernote.js?r=kvSsMen_US:183:16) at $scope.save (angular-modules.ea316b0e5a441e837ef0baec953b7050.js:2923:44) at fn (eval at compile (angular.min.js?r=kvSsMen_US:253:164), <anonymous>:4:132) at e (angular.min.js?r=kvSsMen_US:200:191)
    – ASav
    Commented Jul 27 at 16:29
  • at b.$eval (angular.min.js?r=kvSsMen_US:156:180) at b.$apply (angular.min.js?r=kvSsMen_US:156:423) at HTMLButtonElement.<anonymous> (angular.min.js?r=kvSsMen_US:200:276) at HTMLButtonElement.dispatch (jquery.min.js:3:12369) at r.handle (jquery.min.js:3:9088)
    – ASav
    Commented Jul 27 at 16:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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