Skip to main content

Multi-step forms

If you need to ask for information to users in a multistep approach, YepCode Forms can support this.

You just need to return during the process execution of the first process, a JSON with the next step process id:

return {
nextProcessId: "719d7c83-...",
};

Doing this, after a successfull form submission, our SDK will render the form related with the received next process identifier.

tip

For a multistep form, it may be interesting to change the button title by "Next". See how to do that.

The second, third,... and sucesive form steps process executions will receive the previous generated data, and also the execution results. This will allow for example to collect information in several steps, and use all of them in the last step.

The previous steps information is published into YepCode, so if you write this code in third step...

const {
context: { parameters },
} = yepcode;

console.log(parameters);

... you'll see some output like this:

{
"attribute1FromThirdStep": "your-value",
"attribute2FromThirdStep": "your-value",
"steps": [
{
"processId": "f3997abe3-....",
"data": {
"attributeFromFirstStep": "your-value"
},
"result": {
"executionResultAttributeFirstStep": "your-value"
}
},
{
"processId": "f39975e3-....",
"data": {
"attributeFromSecondStep": "your-value"
},
"result": {
"executionResultAttributeSecondStep": "your-value"
}
}
]
}