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

Add Ability to Not Save Contact Form Entries to the Database #8430

Open
TheJeffr0 opened this issue Dec 28, 2017 · 3 comments
Open

Add Ability to Not Save Contact Form Entries to the Database #8430

TheJeffr0 opened this issue Dec 28, 2017 · 3 comments
Labels
[Feature] Contact Form [Focus] GDPR Good For Community [Pri] Normal [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects

Comments

@TheJeffr0
Copy link

The Contact Form module in Jetpack saves entries to the database and are able to be viewed via the Feedback menu item. These entries contain personal identifiable information. In light of the GDRP which takes affect in May 2018, and in general, I would like the ability to discard entries or not save them to the database.

@eliorivero
Copy link
Contributor

eliorivero commented Dec 29, 2017

Hi Jeff, this can be done deleting the post after it was used to render the ok message with this filter:

<?php

/**
 * Delete the submitted entry once it's been used to send the mail and render the ok message.
 *
 * @param string $r_success_message Confirmation after message was sent.
 *
 * @return string Confirmation after message was sent.
 */
function er_delete_contact_form_submission( $r_success_message ) {
	if ( isset( $_GET['contact-form-sent'] ) && ctype_digit( $_GET['contact-form-sent'] ) && 'feedback' === get_post_type( $_GET['contact-form-sent'] ) ) {
		wp_delete_post( intval( $_GET['contact-form-sent'] ), true );
	}
	return $r_success_message;
}
add_filter( 'grunion_contact_form_success_message', 'er_delete_contact_form_submission' );

This is an interesting topic, perhaps we'll have to include an option for less tech savvy users so they can choose not to save entries to the db.

@jeherve jeherve added [Feature] Contact Form [Pri] Normal [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it Good For Community labels Dec 29, 2017
@TheJeffr0
Copy link
Author

I know that the Jetpack Twitter account notified the public that it's working towards adding Privacy features for GDPR compliance. Perhaps this option could be bundled into that

https://twitter.com/jetpack/status/889023199920443392?ref_src=twsrc%5Etfw&ref_url=https%3A%2F%2Fwww.codeinwp.com%2Fblog%2Fcomplete-wordpress-gdpr-guide%2F

@jeherve jeherve added GDPR and removed GDPR labels Jan 16, 2018
@jeherve jeherve added this to To Do in GDPR Jan 16, 2018
@jeherve jeherve moved this from To Do to Proposals in GDPR Jan 16, 2018
@withinboredom withinboredom added this to the GDPR Compliant milestone Jan 31, 2018
@stale
Copy link

stale bot commented Sep 17, 2018

This issue has been marked as stale. This happened because:

  • It has been inactive in the past 6 months.
  • It hasn’t been labeled `[Pri] Blocker`, `[Pri] High`.

No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.

@stale stale bot added the [Status] Stale label Sep 17, 2018
@kraftbj kraftbj removed this from the GDPR Compliant milestone Apr 2, 2019
@stale stale bot removed the [Status] Stale label Apr 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Contact Form [Focus] GDPR Good For Community [Pri] Normal [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
GDPR
  
Proposals
Development

No branches or pull requests

5 participants