Newsletter subscription confirmation
2 posts by 1 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: June 1, 2018 (RSS)
By gversion - June 1, 2018
Hello,
Is it possible to redirect the user to a thank you page if they successfully submit the newsletter subscription form? Something like the below code should work but I am not sure where to put it and ideally don't want to have to edit any core plugin files.
// on success
redirectBrowserToURL("/thankyou-subscription.php");
exit;
Any help would be much appreciated.
Regards,
Greg
By gversion - June 1, 2018
OK, I have updated newsletterBuilder.php as folllows:
// send alert
/*$errorsAndAlerts .= sprintf( t("Thanks, we've emailed you at %s, to confirm your subscription just check your mail and click the confirmation link."), htmlencode($to)). "<br/>\n";
$errorsAndAlerts .= sprintf( t("If you don't receive an email from us within a few minutes check your spam filter for messages from %s"), htmlencode($newsletterSettings['from_email'])). "<br/>\n";*/
// on success
redirectBrowserToURL("/thankyou-subscription.php");
exit;
Seems to work fine although it does involve editing the core file, which is a shame.
Regards,
Greg