Entry Forms#
There forms will define different type of entries that can be used in a project.
Each entry needs an associated form with name entry_form:X
, where X is the name
of the entry. Form example, the Screening entry requires a form named entry_form:screening
.
In this form, parameters are defined in JSON format, from which the GUI will be generated and
the data will be stored.
Basic Parameters Definition#
The following shows an example entry form that illustrate the parameters definition described previously.
1{
2 "title": "Screening",
3 "sections": [
4 {
5 "label": "Grids Comments",
6 "params": [
7 {
8 "id": "grids_table",
9 "label": "Grids Table",
10 "type": "table",
11 "columns": [
12 {
13 "id": "gridbox_label",
14 "label": "Grid Label"
15 },
16 {
17 "id": "sample",
18 "label": "Sample",
19 "type": "text"
20 },
21 {
22 "id": "comments",
23 "label": "Comments",
24 "type": "text"
25 }
26 ],
27 "min_rows": 5
28 }
29 ]
30 },
31 {
32 "label": "Report Images",
33 "params": [
34 {
35 "id": "images_table",
36 "label": "Images Table",
37 "type": "table",
38 "columns": [
39 {
40 "id": "image_title",
41 "label": "Image Title"
42 },
43 {
44 "id": "image_description",
45 "label": "Image Description",
46 "type": "text"
47 },
48 {
49 "id": "image_file",
50 "label": "Image File",
51 "type": "file_image"
52 }
53 ],
54 "min_rows": 5
55 }
56 ]
57 }
58 ]
59}
Customs Param and Required Content#
For some type of entries, we want the GUI Form to display information from the database or a custom widget. This can be achieved with the custom type of parameter where a template value is required pointing to the HTML template. Addionally, several content functions will be listed to provide the data required to render this form and its custom parameters.
1{
2 "title": "Grids Storage",
3 "params": [
4 {
5 "id": "grids_storage_table",
6 "label": "Grids Storage Table",
7 "type": "table",
8 "columns": [
9 {
10 "id": "gridbox_label",
11 "label": "GridBox Label"
12 },
13 {
14 "id": "puck_id",
15 "label": "Puck",
16 "type": "custom",
17 "template": "param_select_puck.html"
18 },
19 {
20 "id": "box_position",
21 "label": "Box Position",
22 "enum": {
23 "choices": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
24 "display": "combo"
25 }
26 },
27 {
28 "id": "grid_position",
29 "label": "Grid Position",
30 "enum": {
31 "choices": [1, 2, 3, 4],
32 "display": "combo",
33 "multiple": true
34 }
35 },
36 {
37 "id": "sample",
38 "label": "Sample",
39 "type": "text"
40 },
41 {
42 "id": "sessions",
43 "label": "Session(s)"
44 },
45 {
46 "id": "atlas",
47 "label": "Atlas",
48 "type": "bool"
49 },
50 {
51 "id": "EPU",
52 "label": "EPU",
53 "type": "bool"
54 }
55 ],
56 "min_rows": 5
57 }
58 ],
59 "content": [
60 {
61 "func": "grids_storage"
62 }
63 ]
64}