Passing data between Wizard steps

Hello,

I am trying to achieve this:

After a user inputs a url at first wizard step, and clicks next, to pass the url's data (it will call an API system, I will generate an array) at 5 Selects on second step, in order for a user to map the APIs data with our logic.

I have tried to do this with "afterValidation()" function, with no luck

->afterValidation(
    function ($state, callable $set) {
        $xml_data = simplexml_load_file($state['url_input']);
               // some logic here to return the array
        $set('field_from_tab1', $resultArray);

    })

,


with no luck.

Although, I tryied to do the same at Select->option() function, but it is not good practive to call the same API 5 times to get the same data...

How it is possible to pass the data from one step to another?

it is possible somehow to set a global variable, save the data globally and retrieve them later?
Was this page helpful?