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
  • Example
  • 1. Update Progress-bar Text

Was this helpful?

  1. Essentials
  2. Variables

Progress Percentage ($p)

Tracks the progress percentage (%) of a multi-step form.

The special $p variable tracks the progress percentage of a multi-step form, allowing you to dynamically update elements and provide visual indicators of user progress. Use it to create interactive progress bars, display conditional content, and show completion indicators.

  • Access Progress Percentage: Retrieve the current progress percentage of the form.

  • Dynamic Updates: Use the progress percentage to update elements dynamically.

Pro Tip

Don't forget to check out our native Progress Bar implentation for automatically generating a progress bar.

→ Read about Progress Bar


Example

Since Superform is built in vanilla JavaScript, you will see both HTML and Webflow examples, it's practically the same — works with Webflow's Custom Element and elements inside Code Embed.

1. Update Progress-bar Text

HTML Example

index.html
<div sf-el="progress-bar" class="progress_bar">
 <div>
<span sf-react="text($p)">percentage</span>
 %</div>
</div>

Webflow Example

Pro Tip

Use the $p variable to create interactive and visually engaging forms. Seamlessly integrate it within progress bars, conditional content, and completion indicators for a dynamic user experience.

Last updated 10 months ago

Was this helpful?

🫀