Q: Cakephp 3 - Building an entity over several forms/actions This is a design question.
I'm trying to build a booking system in cakephp3.
I've never done something like this with cake before.
I thought the best way might be to -- as the post title suggests -- build up an entity over several forms/actions.
Something like choose location -> enter customer details -> enter special requirements -> review full details and pay
So each of those stages becomes an action within my booking controller. The view for each action submits its content to the next action in the chain, and i use patch entity with the request data, and send the result to the new action's view.
I've started to wonder if this is a good way to do it. One significant problem is that the data from each of the previous actions has to be stored in hidden fields so that it can be resubmitted with the new data from the current action.
I want the data from previous actions to be visible in a read only fashion so I've used the entity that i pass to the view to fill an HTML table. That's nice and it works fine but having to also store that same data in hidden fields is not a very nice way to do it.
I hope this is making sense!
Anyway, I thought I'd post on here for some design guidance as i feel like there is probably a better way to do this. I have considered creating temporary records in the database and just passing the id but i was hoping I wouldn't have to.
Any advice here would be very much appreciated.
Cheers.

A: I would just store the entity in the DB and then proceed with your other views, getting data from the DB. Pseudo:
    public function chooseLocation() {
        $ent = new Entitiy();

        patchEntity($ent,$this->request->data);
        if save entity {
            redirect to enterCustomerDetails($ent[id]);
        }
    }

   public function enterCustomerDetails($id) {
     $ent = $this->Modelname->get($id);
     // patch, save, redirect again ...
  }

