Skip to content

Commit

Permalink
Increase Current Step On Form Submit
Browse files Browse the repository at this point in the history
  • Loading branch information
fernanDOTdo committed Nov 18, 2024
1 parent 410372b commit 33b454b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dist/engrid.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*
* ENGRID PAGE TEMPLATE ASSETS
*
* Date: Sunday, November 17, 2024 @ 21:43:18 ET
* Date: Sunday, November 17, 2024 @ 22:04:49 ET
* By: fernando
* ENGrid styles: v0.19.20
* ENGrid scripts: v0.19.21
Expand Down
7 changes: 5 additions & 2 deletions dist/engrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* ENGRID PAGE TEMPLATE ASSETS
*
* Date: Sunday, November 17, 2024 @ 21:43:18 ET
* Date: Sunday, November 17, 2024 @ 22:04:49 ET
* By: fernando
* ENGrid styles: v0.19.20
* ENGrid scripts: v0.19.21
Expand Down Expand Up @@ -23178,7 +23178,10 @@ class OptInLadder {
this.saveStepToSessionStorage(currentStep, totalSteps); // On form submit, save the checkbox values to sessionStorage

this._form.onSubmit.subscribe(() => {
this.saveOptInsToSessionStorage();
this.saveOptInsToSessionStorage(); // Save the current step to sessionStorage

currentStep++;
this.saveStepToSessionStorage(currentStep, totalSteps);
});
}

Expand Down
2 changes: 1 addition & 1 deletion dist/engrid.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/engrid.min.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/scripts/optin-ladder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ export class OptInLadder {
// On form submit, save the checkbox values to sessionStorage
this._form.onSubmit.subscribe(() => {
this.saveOptInsToSessionStorage();

// Save the current step to sessionStorage
currentStep++;
this.saveStepToSessionStorage(currentStep, totalSteps);
});
}

Expand Down

0 comments on commit 33b454b

Please sign in to comment.