Skip to content

Commit c88c017

Browse files
authored
Add hidennby string to the output of template
1 parent 162fab1 commit c88c017

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

system/Honeypot/Honeypot.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ function __construct(BaseConfig $config)
7272
{
7373
throw HoneypotException::forNoHiddenValue();
7474
}
75+
if ($this->config->hiddenBy === '')
76+
{
77+
throw HoneypotException::forNoHiddenValue();
78+
}
7579

7680
if ($this->config->template === '')
7781
{
@@ -124,7 +128,7 @@ protected function prepareTemplate(string $template): string
124128

125129
if ($this->config->hidden)
126130
{
127-
$template = '<div style="display:none" class="hidden d-none">' . $template . '</div>';
131+
$template = '<div ' . $this->config->hiddenBy . '>' . $template . '</div>';
128132
}
129133
return $template;
130134
}

0 commit comments

Comments
 (0)