diff --git a/src/collective/volto/formsupport/adapters/post.py b/src/collective/volto/formsupport/adapters/post.py index e9ade25..40cc7e5 100644 --- a/src/collective/volto/formsupport/adapters/post.py +++ b/src/collective/volto/formsupport/adapters/post.py @@ -34,8 +34,6 @@ def __init__(self, context, request): if self.block_id: self.block = self.get_block_data(block_id=self.block_id) - self.fields = self.format_fields() - def __call__(self): """ Avoid XSS injections and other attacks. @@ -46,7 +44,7 @@ def __call__(self): self.validate_form() - for field in self.fields: + for field in self.filter_parameters(): field.validate(request=self.request) return self.form_data @@ -227,7 +225,7 @@ def filter_parameters(self): """ do not send attachments fields. """ - return [field for field in self.fields if field.send_in_email] + return [field for field in self.format_fields() if field.send_in_email] def format_fields(self): fields_data = []