Skip to content

Commit 121b08f

Browse files
committed
improve examples
1 parent 7981dd9 commit 121b08f

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

examples/forms-with-multiple-steps/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This example illustrates the main ones.
1515
All the examples will implement the same simple form:
1616
a form that asks for a person's name, email, and age.
1717

18-
## Storing the state in the database
18+
## [Storing the state in the database](./database/)
1919

2020
You can store the state of the partially filled form in the database,
2121
either in the final table where you want to store the data,
@@ -30,7 +30,7 @@ allowing you to have more relaxed column constraints in the partially filled dat
3030
- the website administrator needs to manage a dedicated table for the form state
3131
- old partially filled forms may pile up in the database
3232

33-
## Storing the state in cookies
33+
## [Storing the state in cookies](./cookies/)
3434

3535
You can store each answer of the user in a cookie,
3636
using the
@@ -48,7 +48,7 @@ and retrieve it on the next step using the
4848
- the user needs to have cookies enabled to fill in the form
4949
- if the user leaves the form before submitting it, the form state will keep being sent to all the pages he visits until he submits the form.
5050

51-
## Storing the state in hidden fields
51+
## [Storing the state in hidden fields](./hidden/)
5252

5353
You can store the state of the partially filled form in hidden fields,
5454
using `'hidden' as type` in the [form component](https://sql.datapage.app/component.sql?component=form#component).
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
select 'redirect' as component, 'step_1.sql' as link;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
select 'redirect' as component, 'step_1.sql' as link;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
select 'list' as component, 'Forms with multiple steps' as title;
22

33
select 'Database persistence' as title, 'database' as link;
4-
select 'Cookies' as title, 'cookies/step_1.sql' as link;
5-
select 'Hidden fields' as title, 'hidden/step_1.sql' as link;
4+
select 'Cookies' as title, 'cookies' as link;
5+
select 'Hidden fields' as title, 'hidden' as link;
66

77
select 'text' as component, sqlpage.read_file_as_text('README.md') as contents_md;

0 commit comments

Comments
 (0)