Skip to content

Commit b9402aa

Browse files
feat: Display only resources question (#1214)
AB#122462 --------- Co-authored-by: Antoine Hurard <antoine@reliefapplications.org>
1 parent d0e0054 commit b9402aa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/utils/form/extractFields.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ export const extractFields = async (object, fields, core): Promise<void> => {
1717
if (element.type === 'panel') {
1818
await extractFields(element, fields, core);
1919
} else {
20+
if (element.type === 'resources' && element.displayOnly) {
21+
// Don't store as field if question is display only
22+
continue;
23+
}
2024
if (!element.valueName) {
2125
throw new GraphQLError(
2226
i18next.t('utils.form.extractFields.errors.missingDataField')

0 commit comments

Comments
 (0)