question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Questions when using multiStep form with dynamic steps/pages

See original GitHub issue

Hi,

I am creating a multi-step form with dynamic steps/pages and facing some problems.

Here is the simplify code. https://stackblitz.com/edit/react-kw8ntc

The scenario of my case is

  1. Fill Reference No.,
  2. Check Step 3, then click Next
  3. Fill all fields, then click Previous
  4. Uncheck Step 3, check Step 4, then click Next
  5. Fill all fields, and click Submit.

The form cannot be submitted. I think it keeps Step 3 error status.

I tried to remove the statuses by using setValue, setTouched, setError but it seems not working.

My questions are:

  1. Is it a correct way to reset status(values and errors) for specific fields?
  2. Is there any simple way to remove the whole (step/page)'s values?
  3. Is there any way to set keepState to the Step/Page instead of fields?
  4. What is the purpose of setting step on the field?

Sorry to bother you with so many questions, but thank you for your patience.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
joepuzzocommented, Feb 25, 2020

Ok so I got you! I have refactored and added some cool shit! Stand by for another 20 minutes and I will update the docs!

0reactions
PhilObicommented, May 14, 2021

Done! https://joepuzzo.github.io/informed/?path=/story/multistep-forms--complex-multistep

Is this functionality still available I get redirected whenever I use the link.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tutorial: Add a multistep form to your page - Microsoft Learn
Allows data collection or update process to be broken up over multiple steps. Provides conditions that dynamically change the flow of the steps ......
Read more >
Why You Should Create Multi-Step Forms and How They Can ...
Learn how multi-step forms can help you increase conversions, when you should use them and how to create and embed them on your...
Read more >
Yii multi page form wizard best practice - Stack Overflow
In my completely untested example below I am using a the stateful form functionality. Here is an example of what I basically did...
Read more >
Multi step forms - Webflow Wishlist
I'd like the ability to create multi step/page forms please. I use webflow for lead generation sites and multi step forms can significantly ......
Read more >
The Magic of React-Based Multi-Step Forms - CSS-Tricks
One way to deal with long, complex forms is to break them up into multiple steps. You know, answer one set of questions,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found