Skip to content

Conversation

@Ninodevo
Copy link
Contributor

@Ninodevo Ninodevo commented Oct 17, 2022

Fixes #26875. The initial feature was added in this PR.

Changes proposed in this Pull Request:

  • The consent form block field is removed from the "standard" field type and is added to the "extra" field type. The "extra" field type automatically handles the Success Page, Email, and Feedback Views so the field is properly shown. The field is also visible in the CSV export.
  • The email_marketing_consent field setup is moved to the get_field_ids function. The field is set on the first Consent field type.

Jetpack product discussion

This issue was discussed in slack with Jetpack developers before implementation. p1665394433939419-slack-jetpack-developers

Does this pull request change what data or activity we track or use?

No.

Testing instructions:

  1. Enable Contact Form module in Jetpack settings /wp-admin/admin.php?page=jetpack_modules
  2. Create a form using Jetpack form Blocks
  3. Add a Consent form block - the type of the Consent block is irrelevant

Screenshot 2022-10-17 at 15 25 22

  1. Add an Email address in the form settings to send to

Screenshot 2022-10-17 at 15 26 14

  1. Set the form setting field On Submission = Show a summary of submitted fields
  2. Submit the form on the site with the consent field selected

Sucessful Results

  1. Consent field is visible on the success page

Screenshot 2022-10-17 at 16 13 29

  1. Consent field is visible on the Feedback View

Screenshot 2022-10-17 at 16 19 13

  1. Consent field is visible in the after-submit email

Screenshot 2022-10-17 at 16 17 04

@matticbot
Copy link
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Hello Ninodevo! These changes need to be synced to WordPress.com - If you 're an a11n, please commandeer and confirm D90037-code works as expected before merging this PR. Once this PR is merged, please commit the changes to WP.com. Thank you!
This revision will be updated with each commit to this PR

@github-actions github-actions bot added [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Feature] Contact Form labels Oct 17, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Oct 17, 2022

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team review" label and ask someone from your team review the code.
Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.


Jetpack plugin:

  • Next scheduled release: November 1, 2022.
  • Scheduled code freeze: October 25, 2022.

@github-actions github-actions bot added the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Oct 17, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Oct 17, 2022

Are you an Automattician? You can now test your Pull Request on WordPress.com. On your sandbox, run bin/jetpack-downloader test jetpack fix/consent-field-not-added-to-email to get started. More details: p9dueE-5Nn-p2

@Ninodevo Ninodevo added [Status] Needs Review This PR is ready for review. and removed [Status] In Progress labels Oct 17, 2022
@samiff samiff removed the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Oct 17, 2022
@samiff samiff self-requested a review October 17, 2022 17:28
@samiff samiff added this to the jetpack/11.5 milestone Oct 17, 2022
Copy link
Contributor

@samiff samiff left a comment

Choose a reason for hiding this comment

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

Tested with a checkbox consent field and both states worked well for me 👍

@samiff samiff added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels Oct 17, 2022
@Ninodevo Ninodevo merged commit f48e149 into trunk Oct 18, 2022
@Ninodevo Ninodevo deleted the fix/consent-field-not-added-to-email branch October 18, 2022 13:56
@github-actions github-actions bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label Oct 18, 2022
@github-actions
Copy link
Contributor

Great news! One last step: head over to your WordPress.com diff, D90037-code, and deploy it.
Once you've done so, come back to this PR and add a comment with your SVN changeset ID (e.g. r12345-wpcom).

Thank you!

@Ninodevo
Copy link
Contributor Author

Ninodevo commented Oct 18, 2022

Thank you for the review @samiff. Can I also add you for the WP.com diff D90037 as a reviewer? I've tested it and works as expected.
I can't find your username there to add you.

@samiff
Copy link
Contributor

samiff commented Oct 18, 2022

Approved the diff 👍

@Ninodevo
Copy link
Contributor Author

Ninodevo commented Oct 20, 2022

Just noting that the grunion-contact-form was defused in diff D90043 and that this diff D90037 is not needed anymore. I closed the diff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Contact Form [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ Touches WP.com Files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consent Form Block: consent not being added to the success page, email and feedback view

4 participants