From 97f718ccbdf5d6e427100f6b0c3637c6e63646e4 Mon Sep 17 00:00:00 2001 From: Joel Collins Date: Thu, 21 Nov 2019 12:39:39 +0000 Subject: [PATCH] Added example of static default values to val_disposable --- .../plugins/testing/form_example/forms.json | 29 ++++++++----------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/openflexure_microscope/plugins/testing/form_example/forms.json b/openflexure_microscope/plugins/testing/form_example/forms.json index 4aee4dcd..0739ea28 100644 --- a/openflexure_microscope/plugins/testing/form_example/forms.json +++ b/openflexure_microscope/plugins/testing/form_example/forms.json @@ -1,8 +1,7 @@ { "id": "test-plugin", "icon": "pets", - "forms": [ - { + "forms": [{ "name": "Simple request", "isCollapsible": false, "isTask": false, @@ -10,8 +9,7 @@ "route": "/do", "submitLabel": "Do things", "schema": [ - [ - { + [{ "fieldType": "numberInput", "placeholder": "Some integer", "name": "val_int", @@ -25,8 +23,7 @@ "name": "val_str" } ], - [ - { + [{ "fieldType": "radioList", "name": "val_radio", "label": "Radio value", @@ -54,8 +51,8 @@ { "fieldType": "textInput", - "placeholder": "Some string", "label": "Non-persistent string", + "default": "A default value", "name": "val_disposable" } ] @@ -66,15 +63,13 @@ "selfUpdate": true, "route": "/task", "submitLabel": "Start task", - "schema": [ - { - "fieldType": "numberInput", - "placeholder": "", - "name": "run_time", - "label": "Run time (seconds)", - "minValue": 1 - } - ] + "schema": [{ + "fieldType": "numberInput", + "placeholder": "", + "name": "run_time", + "label": "Run time (seconds)", + "minValue": 1 + }] } - ] + ] } \ No newline at end of file