File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
wagtailstreamforms/models Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -27,3 +27,6 @@ Any settings with their defaults are listed below for quick reference.
27
27
WAGTAILSTREAMFORMS_FORM_TEMPLATES = (
28
28
(' streamforms/form_block.html' , ' Default Form Template' ),
29
29
)
30
+
31
+ # show the form reference field in the list view and export
32
+ WAGTAILSTREAMFORMS_SHOW_FORM_REFERENCE = True
Original file line number Diff line number Diff line change 1
1
import uuid
2
2
3
+ from django .conf import settings
3
4
from django .db import models
4
5
from django .utils .translation import gettext_lazy as _
5
6
from wagtail import VERSION as WAGTAIL_VERSION
@@ -148,7 +149,8 @@ def get_data_fields(self):
148
149
(get_slug_from_string (field ["value" ]["label" ]), field ["value" ]["label" ])
149
150
for field in self .get_form_fields ()
150
151
]
151
-
152
+ if getattr (settings , "WAGTAILSTREAMFORMS_SHOW_FORM_REFERENCE" , False ):
153
+ data_fields += [("form_reference" , _ ("Form reference" ))]
152
154
return data_fields
153
155
154
156
def get_form (self , * args , ** kwargs ):
You can’t perform that action at this time.
0 commit comments