Closed MrJamesEllis closed 7 years ago
Hi
HoneypotField::Field() overrides FormField::Field() but doesn't implement the onBeforeRender extension hook found there.
Could https://github.com/studiobonito/silverstripe-spamprotection-honeypot/blob/master/src/FormField/HoneypotField.php#L67 be updated to include this hook before the fields are created?
e.g
public function Field($properties = array()) { $this->extend('onBeforeRender', $this); return $this->createHoneypotField() . $this->createTimestampField(); }
This would allow an extension to modify attributes on the two fields return e.g changing the field name property globally via config.
Thanks James
Closing, found another way :)
Hi
HoneypotField::Field() overrides FormField::Field() but doesn't implement the onBeforeRender extension hook found there.
Could https://github.com/studiobonito/silverstripe-spamprotection-honeypot/blob/master/src/FormField/HoneypotField.php#L67 be updated to include this hook before the fields are created?
e.g
This would allow an extension to modify attributes on the two fields return e.g changing the field name property globally via config.
Thanks James