Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Afform - Store submissions in a new database table #21105

Merged
merged 1 commit into from
Aug 24, 2021

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented Aug 12, 2021

Overview

This adds the civicrm_afform_submission table and accompanying api entity for logging form submissions, and adds a new option:

image

@civibot
Copy link

civibot bot commented Aug 12, 2021

(Standard links)

@civibot civibot bot added the master label Aug 12, 2021
@colemanw colemanw force-pushed the afformSubmission branch 5 times, most recently from a9f6576 to 03383dc Compare August 13, 2021 01:24
@colemanw
Copy link
Member Author

I originally created this PR because I thought it a prerequisite for uploading files, but I now think that data can be passed via JWT. So this could be an opt-in behavior and not all forms need to save their submissions.

@colemanw colemanw marked this pull request as draft August 14, 2021 18:42
@colemanw colemanw marked this pull request as ready for review August 16, 2021 06:34
@colemanw
Copy link
Member Author

@seamuslee001 I've added a setting to make logging submissions optional, per @totten's suggestion, which should make this easier to merge.
image

@seamuslee001
Copy link
Contributor

thanks @colemanw I'll take a look shortly

This adds the `civicrm_afform_submission` table and accompanying api entity,
and a new Afform setting "create_submission" which will store a
submission record whenever a form is submitted.
PRIMARY KEY (`id`),
CONSTRAINT FK_civicrm_afform_submission_contact_id FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact`(`id`) ON DELETE SET NULL
)
ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seamuslee001 I manually added ROW_FORMAT=DYNAMIC but in case you want to tackle getting civix to do it...

@seamuslee001
Copy link
Contributor

I R-runed this locally and confirmed the upgrade works and confirmed logging works as expected as well MOP

@eileenmcnaughton eileenmcnaughton merged commit c31f540 into civicrm:master Aug 24, 2021
@eileenmcnaughton eileenmcnaughton deleted the afformSubmission branch August 24, 2021 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants