Answers.Body: <p>I had a go at building in FB and it worked for me as expected to 'add activity'</p>
  <p>there is a short-lived example here
  <a href="https://dmaster.demo.civicrm.org/civicrm/admin/afform#/create/form/Individual" rel="nofollow noreferrer">https://dmaster.demo.civicrm.org/civicrm/admin/afform#/create/form/Individual</a></p>
  <p>maybe gives you some clues?</p>
  <p><a href="https://i.sstatic.net/oTnleK7A.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/oTnleK7A.png" alt="enter image description here" /></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-11T01:27:26.283Z
Answers.Text: 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.
Answers.UserDisplayName: ASav
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-11T21:44:00.547Z
Answers.Text: 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?
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-27T16:26:58.290Z
Answers.Text: 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.
Answers.UserDisplayName: ASav
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-27T16:29:09.870Z
Answers.Text: 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)
Answers.UserDisplayName: ASav
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-27T16:29:13.273Z
Answers.Text: 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)
Answers.UserDisplayName: ASav
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-28T00:23:16.120Z
Answers.Text: Issue1 - there are settings on the Form Settings tab to set permissions to using the form
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-28T00:25:02.373Z
Answers.Text: Issue2 - seems to work for me on a new FB at https://dmaster.demo.civicrm.org/civicrm/admin/afform - maybe worth trying with some different civi Themes?
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-28T02:00:26.547Z
Answers.Text: Thanks so much for your continued assistance. Re: the permissions issue, sorry I deleted my comment before I realized you had responded.  I had already set that to Generic - All users including anonymous.  It turned out I *also* had to open up an API access permission in Joomla.  That seems odd, but it definitely works.  Turning it on allows anonymous users to enter.  I don't love making it public that I have that on on my site which is why I delete my prior comment.
  
  Will try a new admin theme now.  Thanks for that suggestion!!!
Answers.UserDisplayName: ASav
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-28T02:04:36.783Z
Answers.Text: PS - Do you happen to know if there a joomla sandbox anywhere?  I see some commentary here https://lab.civicrm.org/infra/ops/-/issues/982 about one being taken down.
Answers.UserDisplayName: ASav
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-28T02:57:54.387Z
Answers.Text: Well, I resolved for now!  Disabled SummerNote as a CiviCRM Extension and I'm in business. I can re-enable it when I'm not using formbuilder.  Thank you again for helping me out.  This was quite a journey!
Answers.UserDisplayName: ASav
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-10T22:58:08.140Z
Answers.LastActivityDate: 2024-07-10T22:58:08.140Z
Answers.UserDisplayName: petednz - fuzion
Body: <p>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.</p>
  <p>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.</p>
  <p>Goals:</p>
  <ul>
  <li>Anonymous user submits a form which contains both user info (name, email etc.) and custom fields.</li>
  <li>User can submit the form more than once. Typically this happens once every few months.</li>
  <li>Custom field info retained for each submission separately - ideally with date of submission.</li>
  <li>User info updated to the most recent using de-dupe rules.</li>
  <li>User and Admin user get confirmation email after each submission.</li>
  <li>Administrative user can export submissions from all users.</li>
  </ul>
  <p><strong>First attempt: Tab with table</strong> - New set of custom fields. &quot;Tab with table&quot; style. New profile for this set of fields and some contact info, and then &quot;Use Create&quot; mode.</p>
  <p>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.</p>
  <p><strong>Second attempt: Activities</strong> - 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.)</p>
  <p><strong>Third attempt: Cases</strong> - 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 &quot;Profile search, view and edit are not supported for Profiles which include fields for more than one record type.&quot; 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.</p>
  <p><strong>Fourth attempt: Pretend this is an event</strong> - 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.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-07-10T22:42:39.907Z
Comments.Text: Multi record (Does this Custom Field Set allow multiple records) or Activities seem best fit for you I agree. Have you tried  https://civicrm.org/extensions/activity-profile
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-07-10T22:56:38.120Z
Comments.Text: Other approach would be FB but you said you had issues - maybe spell those out in a separate ticket - does this give any clues? https://civicrm.stackexchange.com/questions/46442/linking-a-form-to-log-as-an-activity-on-an-individuals-profile
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-07-11T01:27:40.110Z
Comments.Text: Thanks for that suggestion, I will try activity- profile and report back.
Comments.UserDisplayName: ASav
Tags: <custom-fields><multiple-records>
Title: One to N relationships to custom data
ThreadText: # One to N relationships to custom data
  
  (Asked by: username_0 on 2024-07-10)
  
  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.
  
  **Tags:** custom-fields, multiple-records
  
  > **Comments:**
  > **username_1**: Multi record (Does this Custom Field Set allow multiple records) or Activities seem best fit for you I agree. Have you tried  https://civicrm.org/extensions/activity-profile  
  > **username_1**: Other approach would be FB but you said you had issues - maybe spell those out in a separate ticket - does this give any clues? https://civicrm.stackexchange.com/questions/46442/linking-a-form-to-log-as-an-activity-on-an-individuals-profile  
  > **username_0**: Thanks for that suggestion, I will try activity- profile and report back.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-07-10. Score: 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](https://i.sstatic.net/oTnleK7A.png)](https://i.sstatic.net/oTnleK7A.png)
  
  > **Comments:**
  > **username_0**: 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.  
  > **username_1**: 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?  
  > **username_0**: 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.  
  > **username_0**: 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)  
  > **username_0**: 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)  
  > **username_1**: Issue1 - there are settings on the Form Settings tab to set permissions to using the form  
  > **username_1**: Issue2 - seems to work for me on a new FB at https://dmaster.demo.civicrm.org/civicrm/admin/afform - maybe worth trying with some different civi Themes?  
  > **username_0**: Thanks so much for your continued assistance. Re: the permissions issue, sorry I deleted my comment before I realized you had responded.  I had already set that to Generic - All users including anonymous.  It turned out I *also* had to open up an API access permission in Joomla.  That seems odd, but it definitely works.  Turning it on allows anonymous users to enter.  I don't love making it public that I have that on on my site which is why I delete my prior comment.  Will try a new admin theme now.  Thanks for that suggestion!!!  
  > **username_0**: PS - Do you happen to know if there a joomla sandbox anywhere?  I see some commentary here https://lab.civicrm.org/infra/ops/-/issues/982 about one being taken down.  
  > **username_0**: Well, I resolved for now!  Disabled SummerNote as a CiviCRM Extension and I'm in business. I can re-enable it when I'm not using formbuilder.  Thank you again for helping me out.  This was quite a journey!  
  
  ---
  
  