If you have a multi step form, you can store the intermediate datas in the session.
And when you are on the last step to save all datas in the database, you can retrieve the intermediate datas from the session.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi, I have a question. I'm creating a step-by-step form using Laravel & Livewire 3, and this form will be used for creating a recipe.
Visual example of Step-By-Step Form: https://i.ibb.co/Y492VbrR/multi-02.png
Visual example of Dynamic Input Fields: https://i.ibb.co/mCtbN1gd/2025-03-03-202308.jpg
An approximate structure of Dynamic Input Fields:
This form will have three steps:
Steps 2 and 3 will have dynamic input fields. For example, in the Ingredients step, users will be able to create multiple blocks (each block will allow them to enter data for one ingredient), so they can add multiple ingredients. Similarly, in the Instruction step, users will be able to dynamically create multiple input field blocks where they can enter step-by-step instructions for the recipe.
My question is: Should I implement the logic for dynamic input fields in separate Livewire components?
Since the entire step-by-step form will be in one component, I need a way to retrieve data from steps 2 and 3. But if I create steps 2 and 3 as separate Livewire components, I’m not sure how to access the data from these steps when I need to retrieve the request data from the entire form.
So, my main question is: Should I handle everything in a single component, or should I create separate Livewire components for the dynamic input fields and then include them in the step-by-step form?
Could you please clarify this for me?
Please or to participate in this conversation.