Add honeypot field for spambot
[MAILPOET-1014]
This commit is contained in:
@ -15,6 +15,7 @@ class Renderer {
|
||||
$styles = new Util\Styles(static::getStyles($form));
|
||||
|
||||
$html = '<style type="text/css">';
|
||||
$html .= '.mailpoet_hp_email_label{position: absolute;left: -999em;}';// move honeypot field out of the sight
|
||||
$html .= $styles->render($prefix);
|
||||
$html .= '</style>';
|
||||
|
||||
@ -38,7 +39,8 @@ class Renderer {
|
||||
}
|
||||
|
||||
static function renderBlocks($blocks = array()) {
|
||||
$html = '';
|
||||
// this is a honeypot for spambots
|
||||
$html = '<label class="mailpoet_hp_email_label">Please leave this field empty<input type="email" name="data[email]"></label>';
|
||||
foreach($blocks as $key => $block) {
|
||||
$html .= static::renderBlock($block)."\n";
|
||||
}
|
||||
|
Reference in New Issue
Block a user