From f541a94351086098fde79db12aadd6cb32981efd Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 20 Nov 2017 12:38:50 -0600 Subject: [PATCH] Set widget when defining enum for a form2 field --- tailbone/forms2/core.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tailbone/forms2/core.py b/tailbone/forms2/core.py index 06183d4c..56c10b93 100644 --- a/tailbone/forms2/core.py +++ b/tailbone/forms2/core.py @@ -332,6 +332,7 @@ class Form(object): if enum: self.enums[key] = enum self.set_type(key, 'enum') + self.set_widget(key, dfwidget.SelectWidget(values=list(enum.items()))) else: self.enums.pop(key, None)