Skip to content

Commit

Permalink
Implement onDisplayOverride TALES field
Browse files Browse the repository at this point in the history
  • Loading branch information
chiruzzimarco committed Oct 17, 2022
1 parent fdb3647 commit d41566b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/collective/easyform/browser/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,18 @@ def form_name(self):
return self.context.nameAttribute
return None

def getOnDisplayOverride(self):
"""Evaluate form setup script TALES expression stored in the
onDisplayOverride field if defined
"""
if self.context.onDisplayOverride:
get_expression(self.context, self.context.onDisplayOverride)

def render(self):
self.getOnDisplayOverride()
self.updateWidgets()
return super(EasyFormForm, self).render()


class EasyFormFormWrapper(FormWrapper):
form = EasyFormForm
Expand Down

0 comments on commit d41566b

Please sign in to comment.