zaguiini / formik-wizard

A multi-step form component powered by formik and react-albus
MIT License
86 stars 26 forks source link

Values upto a certain step #20

Closed nishojib closed 4 years ago

nishojib commented 4 years ago

Is there a way I can get access to the values up to a certain step?

Say I have 4 steps: A, B, C, and D.

A has 2 values (name and age) B has 2 value (companyName and designation) C has 3 value (street, zipcode and country) D is the final step

I want to gain access to the values before step C that is (name, age, companyName, designation) at C. Is there any way I can get that?

Hopp3r commented 4 years ago

Pretty sure you can use the wizard context for that.

nishojib commented 4 years ago

Oh yes!! Thank you very much. I actually missed that part in the Usage section.

ataravati commented 4 years ago

@supremeboy18 @Hopp3r But, how do you access the wizard context from a step. I can access it from the form wrapper, but I don't know how to get access to it from inside the step.