Superform by Delta Clan
✨ ClonablesSocialResourcesSuperform Home
v2
v2
  • 🏁Getting Started
    • Introduction
    • Quick Start
  • 🫀Essentials
    • Form Container
    • Step Container
    • Navigation - Overview
      • Direct
      • Logic / Conditional
      • Hook
    • Variables
      • Form Data ($f)
      • Step Index ($s)
      • Progress Percentage ($p)
      • Scoring Variables ($v)
    • Progress Bar
    • Reset
    • Radio Groups
    • Checkbox Groups
    • Cheatsheet
  • ⚙️Global Options
    • Step Delay Controls
    • Animations
      • Step Animation
      • Step Animation Duration
      • Step Animation Ease
    • Save Data & Progress
    • Pre-fill Form
    • Prevent Content Flash
    • Debug
    • Third-party Integrations
    • Cheatsheet
  • 🎛️Input Validation & Errors
    • Validation
      • length()
      • words()
      • minmax()
      • checkbox()
      • must()
      • hook()
    • Error Management
      • Automatic Error Setup
      • Manual Error Setup
  • ⚡Reactivity
    • Update Text
    • Visibility
    • Class Toggle
    • Value
    • Set Attribute
  • 🔢Score Tracking
    • Score Setup & Calculation
    • Score Ranking
  • ⌨️Accessibility
    • Enter & Backspace Bindings (↩, ⌫)
    • Checkbox & Radio Bindings
  • 🛠️Javascript SDK
    • Intro to Superform API
    • Superform Instance
    • Cheatsheet
  • 📖Additional Resources
    • WTF is an expression ? 🆕
    • Integrations
    • Tutorials
    • Changelog
    • FAQ 🚧
    • Join Discord
Powered by GitBook
On this page

Was this helpful?

  1. Essentials

Reset

Reset form data & progress.

Setup

Attribute: sf-reset = "true"

Where: Any element within the form success or error messages.

Resets the form's data, progress and takes the user back to the first step.

Use Cases:

  • Resetting the form after submission to allow for a new form entry without a page refresh.

  • Clearing the form data and starting over from the first step.

HTML Example

index.html
<div>
   <p>Success! If you want to go again, hit "Retry"!</p>
   <input type="reset" sf-goto="step-1" value="Reset form">
</div>

Webflow Example

<!-- Anywhere within the Success or Error blocks --> 
<div>
     <p>Success! If you want to go again, hit "Retry"!</p>
     <button sf-reset="true">Retry</button>
</div>

Reset Before Submit

To simulate Reset when inside the normal form flow, just use the sf-goto directive with native DOM element <input type="reset">.

example: <input type="reset" sf-goto="step-1" value="Reset form">

→ Read more about native <input type="reset"> on MDN here.

Last updated 11 months ago

Was this helpful?

🫀