/
update-form-submit.jigx
60 lines (57 loc) · 1.72 KB
/
update-form-submit.jigx
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
title: Update form with submit action
description: Please change/update any details and press Update form button
type: jig.default
actions:
- children:
- type: action.submit-form
options:
formId: form-update
provider: DATA_PROVIDER_DYNAMIC
title: Update form
entity: default/form
method: update
recordId: =@ctx.datasources.form-update.id
goBack: previous
datasources:
form-update:
type: datasource.sqlite
options:
provider: DATA_PROVIDER_DYNAMIC
entities:
- default/form
query: |
SELECT
id,
'$.firstname',
'$.lastname',
'$.phone',
'$.email',
'$.category'
FROM [default/form] WHERE '$.category' = "update-form"
children:
- type: component.form
instanceId: form-update
options:
children:
- type: component.text-field
instanceId: firstname
options:
label: First name
initialValue: =@ctx.datasources.form-update.firstname
- type: component.text-field
instanceId: lastname
options:
label: Last name
initialValue: =@ctx.datasources.form-update.lastname
- type: component.email-field
instanceId: email
options:
label: Email
keyboardType: email-address
initialValue: =@ctx.datasources.form-update.email
- type: component.number-field
instanceId: phone
options:
label: Phone number
keyboardType: number-pad
initialValue: =@ctx.datasources.form-update.phone