Skip to content

Commit 215170e

Browse files
committed
clear up the docs for the login component
1 parent a52b20c commit 215170e

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

examples/official-site/sqlpage/migrations/68_login.sql

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ A few things to know :
1313
- The form uses the POST method to transmit information to the destination page,
1414
- The user''s username and password are entered into fields with the names `username` and `password`,
1515
- To obtain the values of username and password, you must use the variables `:username` and `:password`,
16-
- To know if the user wants their identity to be remembered, you must read the value of the variable `:remember`.
16+
- When you set the `remember_me_text` property, the variable `:remember` becomes available after form submission to check if the user checked the "remember me" checkbox.
1717
', '0.39.0');
1818

1919
INSERT INTO parameter(component, name, description, type, top_level, optional) SELECT 'login', * FROM (VALUES
@@ -43,12 +43,19 @@ INSERT INTO parameter(component, name, description, type, top_level, optional) S
4343
INSERT INTO example(component, description, properties)
4444
VALUES (
4545
'login',
46-
'Using the main options of the login component',
46+
'Using the main options of the login component
47+
48+
When the user clicks the "Sign in" button, the form is submitted to the `/examples/show_variables.sql` page.
49+
There, you will have access to the variables:
50+
- `:username`: the username entered by the user
51+
- `:password`: the password entered by the user
52+
- `:remember`: the string "on" if the checkbox was checked, or NULL if it was not checked
53+
',
4754
JSON(
4855
'[
4956
{
5057
"component": "login",
51-
"action": "login.sql",
58+
"action": "/examples/show_variables",
5259
"image": "../assets/icon.webp",
5360
"title": "Please login to your account",
5461
"username": "Username",

0 commit comments

Comments
 (0)