Skip to content

Commit 33c40bb

Browse files
committed
Added: user_fields and form_fields metadata in document database (#280) (#281)
1 parent cc97c59 commit 33c40bb

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,13 @@ another_form:
132132
field_label: Section Header
133133
description: This is an example of a section header. You can put as much text here as you need to guide users in the submission of the form in the UI.
134134

135-
another_checkbox_input:
136-
input_type: checkbox
137-
output_type: !list
135+
select_input:
136+
input_type: select
137+
output_type: !str
138138
field_label: Select a user
139139
options: !all_usernames_by_group_default
140140
required: true
141-
description: A checkbox input field, illustrating how to use data retrieval tags.
141+
description: A select input field, illustrating how to use data retrieval tags.
142142
```
143143
144144
##### Field Parameters

libreforms_fastapi/utils/document_database.py

+4
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,10 @@ def _initialize_metadata_fields(self):
196196
# self.approved_by_field = "approved_by"
197197
# self.approval_signature_field = "approval_signature"
198198
self.journal_field = "journal"
199+
self.user_fields = "user_fields"
200+
# [self.created_by_field, self.last_editor_field, field_name, field_name]
201+
self.form_fields = "form_fields"
202+
# [(field_name, form_name, [display_field, display_field])]
199203

200204
return [
201205
self.form_name_field,

0 commit comments

Comments
 (0)