Skip to content

Commit

Permalink
Correct Trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
mahype committed Jan 15, 2024
1 parent a21de8f commit e998514
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 26 deletions.
32 changes: 11 additions & 21 deletions docs/events/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This is an example of an events section.
```json
"events": [
{
"trigger": "onChange",
"trigger": "change",
"conditions": [
{
"fieldId": "show",
Expand All @@ -24,9 +24,7 @@ This is an example of an events section.
"actions": [
{
"type": "alert",
"data": {
"message": ""
}
"message": "Message to show when the field with id 'show' is set to 'yes'"
}
]
}
Expand All @@ -49,9 +47,7 @@ Events can be specified any number of times. Moreover, each event contains a tri
"actions": [
{
"type": "alert",
"data": {
"message": "Executed because field 1 was set to yes."
}
"message": "Executed because field 1 was set to yes."
}
]
},
Expand All @@ -67,9 +63,7 @@ Events can be specified any number of times. Moreover, each event contains a tri
"actions": [
{
"type": "alert",
"data": {
"message": "Executed because field 2 was set to yes."
}
"message": "Executed because field 2 was set to yes."
}
]
},
Expand All @@ -90,15 +84,11 @@ Events can be specified any number of times. Moreover, each event contains a tri
"actions": [
{
"type": "alert",
"data": {
"message": "Executed because field 1 and field 2 was set to yes."
}
"message": "Executed because field 1 and field 2 were set to yes."
},
{
"type": "alert",
"data": {
"message": "Just a second alert, because we can."
}
"message": "Executed because field 1 and field 2 were set to yes."
}
]
}
Expand All @@ -109,11 +99,11 @@ Events can be specified any number of times. Moreover, each event contains a tri

There are predefined triggers in Svorm. This is a list of all triggers that Svorm provides:

- onInit
- onChange
- onSubmit
- onNext
- onPrev
- init
- change
- submit
- next
- prev

## Conditions

Expand Down
10 changes: 5 additions & 5 deletions docs/triggers/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

There are predefined triggers in Svorm. This is a list of all triggers that Svorm provides:

- onInit
- onChange
- onSubmit
- onNext
- onPrev
- init
- change
- submit
- next
- prev

0 comments on commit e998514

Please sign in to comment.