Hi all,
I’m currently implementing an onboarding process for new users which allows them to add data over multiple pages, which is only saved at the end. i.e. it’s equivalent to a multiple step/page form. Here are the characteristics of the solution I’m looking for:
- nothing saved to the db until the last form page is submitted, and then everything is saved (I don’t want to handle temp/incomplete state)
- separate pages for each step in the form (not hiding/showing with javascript as I’m keen to minimise client side JS)
- use of standard validation from existing changesets i.e. data needs to be sent and returned from the server for each step completed
Is there a recommended way of doing this in phoenix? I can’t find any examples.
The best option I can think of right now is just using separate non-standard actions for each step. e.g.
:new_step_1, :create_step_1, :new_step_2, :create_step_2… :create
Does that make sense?
Thanks!