Description
Create your Signup Forms with Contact Form 7 and allow users to signup to your newsletter.
This Plugin requires Mailster Newsletter Plugin for WordPress
Additional Info
This Plugin requires Mailster Newsletter Plugin for WordPress
Installation
- Upload the entire
mailster-contact-form-7
folder to the/wp-content/plugins/
directory - Activate the plugin through the āPluginsā menu in WordPress
- Create a new Contact Form 7 form. Provide at least an email field
- Save your form
- Select The Mailster tab and configure the form for Mailster
Reviews
āļø1ļøā£ 21, 2025
If a user subscribes to the contact form 7 form with this plugin, they will be added to the list, but their status will not be automatically confirmed. āDouble-opt-Inā is turned off, meaning they do not have to confirm their unsubscribe, but the user will still not be active. Is there another setting that I missed, or is the plugin unable to make the user an active subscriber immediately?
š 1ļøā£1ļøā£ 9, 2024
1 reply
Hi, I improved the validate and add_subscriber function in classes/contactform.class.php to allow contact from7 to display more errors from mailster instead of just error messages for duplicate subscribers.
public function validate( $result, $tags ) { if ( ! $result->is_valid() ) { return $result; } if ( ! function_exists( āmailsterā ) ) { return $result; } $submission = WPCF7_Submission::get_instance(); if ( ! $submission || ! $posted_data = $submission->get_posted_data() ) { return $result; } $form = WPCF7_ContactForm::get_current(); $properties = $form->get_properties(); // no Mailster settings if ( ! isset( $properties[’mailsterā] ) ) { return $result; } $properties = $properties[’mailsterā]; // not enabled if ( ! $properties[’enabledā] ) { return $result; } // checkbox defined but not checked if ( isset( $properties[’checkboxā] ) && $properties[’checkboxā] && empty( $posted_data[ $properties[’checkboxfieldā] ][0] ) ) { return $result; } $this->userdata = array(); $tag_keys = array_flip( array_filter( wp_list_pluck( $tags, ānameā ) ) ); foreach ( $properties[’fieldsā] as $field => $tag ) { $this->userdata[ $field ] = is_array( $posted_data[ $tag ] ) ? $posted_data[ $tag ][0] : $posted_data[ $tag ]; } $this->userdata[’statusā] = $properties[’doubleoptinā] ? 0 : 1; if ( isset( $properties[’gdpr_timestampā] ) && $properties[’gdpr_timestampā] ) { $this->userdata[’gdprā] = time(); } $this->userdata = apply_filters( āmailster_verify_subscriberā, $this->userdata ); if ( is_wp_error( $this->userdata ) ) { $result->invalidate( $tags[ $tag_keys[ $properties[’fieldsā][ $this->userdata->get_error_code() ] ] ], $this->userdata->get_error_message() ); return $result; } $overwrite = $properties[’overwriteā]; if ( ! $overwrite && mailster( āsubscribersā )->get_by_mail( $this->userdata[’emailā] ) ) { $error_message = isset( $properties[’error_messageā] ) ? $properties[’error_messageā] : __( āYou are already registered!ā, āmailster-cf7′ ); $result->invalidate( $tags[ $tag_keys[ $properties[’fieldsā][’emailā] ] ], $error_message ); return $result; } //new add+ $add_message= $this->add_subscriber(null); if(!empty($add_message)) { $result->invalidate( $tags[ $tag_keys[ $properties[’fieldsā][’emailā] ] ], $add_message ); return $result; }// add_action( āwpcf7_mail_sentā, array( $this, āadd_subscriberā ) ); return $result; } /** * * * @param unknown $contact_form */ public function add_subscriber( $contact_form ) { $form = WPCF7_ContactForm::get_current(); $properties = $form->get_properties(); $properties = $properties[’mailsterā]; $list_ids = isset( $properties[’listsā] ) ? (array) $properties[’listsā] : null; $overwrite = 1 == $properties[’overwriteā]; $merge = 3 == $properties[’overwriteā]; // add subscriber $subscriber_id = mailster( āsubscribersā )->add( $this->userdata, $overwrite || $merge, $merge ); // no error if ( ! is_wp_error( $subscriber_id ) && $list_ids ) { mailster( āsubscribersā )->assign_lists( $subscriber_id, $list_ids ); return ā; }else { return $subscriber_id->get_error_message(); } }
āļø1ļøā£ 13, 2019
Search around for good a good contact form for mailster an found this plugin.Works perfect.
š 9ļøā£ 19, 2017
Does exactly what it’s supposed to do. Smooth integration with CF7, great support.
Contributors & Developers
“Mailster Contact Form 7” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Mailster Contact Form 7” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.5.1
- fix for WordPress 6.1
1.5
- fixed: support for CF7 5.5.3
1.4
- added: options to store GDPR timestamp
1.3.1
- fixed: removed deprecated method
1.3
- new option: āAlways overwrite and keep existing dataā to merge data on existing subscribers.
1.2
- updated file structure
- added translatable strings
1.1
- improved: Subscribers are added only if the form has been submitted successful
- added: new option to disable error message for existing subscribers
- added: new option to define error message.
1.0.1
- fixed: PHP Warning
1.0
- initial release