diff --git a/app_data/sheets/template/quiz_question.json b/app_data/sheets/template/quiz_question.json index b1874ce..9b0b079 100644 --- a/app_data/sheets/template/quiz_question.json +++ b/app_data/sheets/template/quiz_question.json @@ -1115,6 +1115,16 @@ ], "_raw": "changed | set_field:@local.store_response_field: @local.combo_box", "_cleaned": "changed | set_field:@local.store_response_field: @local.combo_box" + }, + { + "trigger": "changed", + "action_id": "set_local", + "args": [ + "show_feedback", + true + ], + "_raw": "changed | set_local: show_feedback: true", + "_cleaned": "changed | set_local: show_feedback: true" } ], "_nested_name": "combo_box", @@ -1218,11 +1228,22 @@ }, { "type": "text_box", + "name": "text_box", "condition": "@local.question_type == \"text_input\"", "parameter_list": { "text_align": "left" }, "action_list": [ + { + "trigger": "changed", + "action_id": "set_field", + "args": [ + "@local.store_response_field", + "this.value" + ], + "_raw": "changed | set_field:@local.store_response_field: @local.text_box", + "_cleaned": "changed | set_field:@local.store_response_field: @local.text_box" + }, { "trigger": "changed", "action_id": "set_local", @@ -1234,8 +1255,7 @@ "_cleaned": "changed | set_local: show_feedback: true" } ], - "name": "text_box_27", - "_nested_name": "text_box_27", + "_nested_name": "text_box", "_dynamicFields": { "condition": [ { @@ -1244,21 +1264,83 @@ "type": "local", "fieldName": "question_type" } - ] + ], + "action_list": { + "0": { + "args": { + "0": [ + { + "fullExpression": "@local.store_response_field", + "matchedExpression": "@local.store_response_field", + "type": "local", + "fieldName": "store_response_field" + } + ] + }, + "_raw": [ + { + "fullExpression": "changed | set_field:@local.store_response_field: @local.text_box", + "matchedExpression": "@local.store_response_field", + "type": "local", + "fieldName": "store_response_field" + }, + { + "fullExpression": "changed | set_field:@local.store_response_field: @local.text_box", + "matchedExpression": "@local.text_box", + "type": "local", + "fieldName": "text_box" + } + ], + "_cleaned": [ + { + "fullExpression": "changed | set_field:@local.store_response_field: @local.text_box", + "matchedExpression": "@local.store_response_field", + "type": "local", + "fieldName": "store_response_field" + }, + { + "fullExpression": "changed | set_field:@local.store_response_field: @local.text_box", + "matchedExpression": "@local.text_box", + "type": "local", + "fieldName": "text_box" + } + ] + } + } }, "_dynamicDependencies": { "@local.question_type": [ "condition" + ], + "@local.store_response_field": [ + "action_list.0.args.0", + "action_list.0._raw", + "action_list.0._cleaned" + ], + "@local.text_box": [ + "action_list.0._raw", + "action_list.0._cleaned" ] } }, { "type": "text_area", + "name": "text_area", "condition": "@local.question_type == \"text_input_long\"", "parameter_list": { "text_align": "left" }, "action_list": [ + { + "trigger": "changed", + "action_id": "set_field", + "args": [ + "@local.store_response_field", + "this.value" + ], + "_raw": "changed | set_field:@local.store_response_field: @local.text_area", + "_cleaned": "changed | set_field:@local.store_response_field: @local.text_area" + }, { "trigger": "changed", "action_id": "set_local", @@ -1270,8 +1352,7 @@ "_cleaned": "changed | set_local: show_feedback: true" } ], - "name": "text_area_28", - "_nested_name": "text_area_28", + "_nested_name": "text_area", "_dynamicFields": { "condition": [ { @@ -1280,11 +1361,62 @@ "type": "local", "fieldName": "question_type" } - ] + ], + "action_list": { + "0": { + "args": { + "0": [ + { + "fullExpression": "@local.store_response_field", + "matchedExpression": "@local.store_response_field", + "type": "local", + "fieldName": "store_response_field" + } + ] + }, + "_raw": [ + { + "fullExpression": "changed | set_field:@local.store_response_field: @local.text_area", + "matchedExpression": "@local.store_response_field", + "type": "local", + "fieldName": "store_response_field" + }, + { + "fullExpression": "changed | set_field:@local.store_response_field: @local.text_area", + "matchedExpression": "@local.text_area", + "type": "local", + "fieldName": "text_area" + } + ], + "_cleaned": [ + { + "fullExpression": "changed | set_field:@local.store_response_field: @local.text_area", + "matchedExpression": "@local.store_response_field", + "type": "local", + "fieldName": "store_response_field" + }, + { + "fullExpression": "changed | set_field:@local.store_response_field: @local.text_area", + "matchedExpression": "@local.text_area", + "type": "local", + "fieldName": "text_area" + } + ] + } + } }, "_dynamicDependencies": { "@local.question_type": [ "condition" + ], + "@local.store_response_field": [ + "action_list.0.args.0", + "action_list.0._raw", + "action_list.0._cleaned" + ], + "@local.text_area": [ + "action_list.0._raw", + "action_list.0._cleaned" ] } }, diff --git a/config.ts b/config.ts index a81439d..119ac37 100644 --- a/config.ts +++ b/config.ts @@ -13,7 +13,7 @@ config.google_drive = { config.git = { content_repo: "https://github.com/IDEMSInternational/pfr-app-content.git", - content_tag_latest: "1.1.21", + content_tag_latest: "1.1.22", }; config.android = { diff --git a/reports/summary.json b/reports/summary.json index 730d237..ee11b04 100644 --- a/reports/summary.json +++ b/reports/summary.json @@ -195,11 +195,11 @@ }, { "type": "set_field", - "count": 22 + "count": 24 }, { "type": "set_local", - "count": 12 + "count": 13 }, { "type": "start_tour", diff --git a/reports/summary.md b/reports/summary.md index 7ed278f..3a05d09 100644 --- a/reports/summary.md +++ b/reports/summary.md @@ -57,8 +57,8 @@ | go_to | 13 | | pop_up | 7 | | reset_app | 2 | -| set_field | 22 | -| set_local | 12 | +| set_field | 24 | +| set_local | 13 | | start_tour | 1 |