react-step-progress icon indicating copy to clipboard operation
react-step-progress copied to clipboard

How to get the form datas of each step

Open iamsajithsasi opened this issue 4 years ago • 5 comments

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

iamsajithsasi avatar Oct 08 '20 10:10 iamsajithsasi

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, }, ]} />

iamsajithsasi avatar Oct 08 '20 10:10 iamsajithsasi

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

saini-g avatar Oct 09 '20 08:10 saini-g

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

nurinfazil avatar Dec 02 '20 04:12 nurinfazil

@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

iamsajithsasi avatar Dec 08 '20 11:12 iamsajithsasi

I made this:

https://pastebin.com/J6AQUBEu

fernando-pineda avatar Apr 08 '21 03:04 fernando-pineda