-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbasic.js
More file actions
101 lines (99 loc) · 2.14 KB
/
basic.js
File metadata and controls
101 lines (99 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import {
ComponentType,
ControllerPath,
ControllerType
} from '@defra/forms-model'
export default /** @satisfies {FormDefinition} */ ({
name: 'Basic',
startPage: '/licence',
pages: /** @type {const} */ ([
{
title: 'Buy a rod fishing licence',
path: '/licence',
components: [
{
options: {
bold: true
},
type: ComponentType.RadiosField,
name: 'licenceLength',
title: 'Which fishing licence do you want to get?',
list: 'licenceLengthDays'
}
],
section: 'licenceDetails',
next: [
{
path: '/full-name'
}
]
},
{
title: "What's your name?",
path: '/full-name',
components: [
{
schema: {
max: 70
},
options: {},
type: ComponentType.TextField,
name: 'fullName',
title: "What's your name?"
}
],
section: 'personalDetails',
next: [
{
path: '/summary'
}
]
},
{
path: ControllerPath.Summary,
controller: ControllerType.Summary,
title: 'Summary'
}
]),
sections: [
{
name: 'licenceDetails',
title: 'Licence details'
},
{
name: 'personalDetails',
title: 'Personal details'
}
],
conditions: [],
lists: [
{
name: 'licenceLengthDays',
title: 'Licence length (days)',
type: 'number',
items: [
{
text: '1 day',
value: 1,
description: 'Valid for 24 hours from the start time that you select'
},
{
text: '8 day',
value: 8,
description:
'Valid for 8 consecutive days from the start time that you select'
},
{
text: '12 months',
value: 365,
description:
'12-month licences are now valid for 365 days from their start date and can be purchased at any time during the year'
}
]
}
],
outputEmail: 'enrique.chase@defra.gov.uk'
})
/**
* @import { FormDefinition } from '@defra/forms-model'
*/