File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 13
13
< h1 > auto-check-element</ h1 >
14
14
< h2 > Simple form</ h2 >
15
15
< p > Input 422 for an error response.</ p >
16
+ < p id ="success1 " class ="success " hidden > Your submission was successful</ p >
16
17
< form >
17
18
< p > All fields marked with * are required</ p >
18
19
@@ -21,11 +22,12 @@ <h2>Simple form</h2>
21
22
< input id ="simple-field " autofocus name ="foo " required />
22
23
< code class ="state "> </ code >
23
24
</ auto-check >
24
- < button > submit</ button >
25
+ < button value =" 1 " name =" form " > submit</ button >
25
26
</ form >
26
27
27
28
< h2 > Form that has custom validity messages</ h2 >
28
29
< p > Input 422 for an error response.</ p >
30
+ < p id ="success2 " class ="success " hidden > Your submission was successful</ p >
29
31
< form id ="custom ">
30
32
< p > All fields marked with * are required</ p >
31
33
@@ -34,11 +36,13 @@ <h2>Form that has custom validity messages</h2>
34
36
< input id ="custom-field " autofocus class ="json " name ="foo " required />
35
37
< code class ="state "> </ code >
36
38
</ auto-check >
37
- < button > submit</ button >
39
+ < button value =" 2 " name =" form " > submit</ button >
38
40
</ form >
39
41
</ main >
40
42
41
43
< script >
44
+ let successN = new URL ( window . location ) . searchParams . get ( 'form' )
45
+ if ( successN ) document . getElementById ( `success${ successN } ` ) . hidden = false
42
46
let focusedInput
43
47
const nativeFetch = window . fetch
44
48
const fakeFetch = function ( _ , options ) {
You can’t perform that action at this time.
0 commit comments