saini-g / react-step-progress

Dynamic multi-step progress indicator for React.
MIT License
82 stars 36 forks source link

How to get the form datas of each step #17

Open iamsajithsasi opened 4 years ago

iamsajithsasi commented 4 years ago

I'm wondering, how the data of each form/steps needs to be obtained. Thanks

iamsajithsasi commented 4 years ago

function form1Data() { // what is the method to get the form1 datas ? }

function onFormSubmit() { // what is the method to get the form datas ? }

const step2Content = (

...some fields...

)

const step1Content = (

...some fields...

)

<StepProgressBar startingStep={0} onSubmit={onFormSubmit} submitBtnName="Add Company" steps={[ { label: "1", name: "StepForm1", content: step1Content, validator: form1Data, }, { label: "2", name: "StepForm1", content: step2Content, }, ]} />

saini-g commented 4 years ago

@iamsajithsasi this feature is not yet implemented, would it be possible for you to raise a PR??

nurinfazil commented 3 years ago

@iamsajithsasi did you find a workaround? I'm having the same problem.

iamsajithsasi commented 3 years ago

@iamsajithsasi did you find a workaround? I'm having the same problem.

Nope. Form were removed from dom during next/prev steps. I had to move owing to time constraints

fernando-pineda commented 3 years ago

I made this:

https://pastebin.com/J6AQUBEu