What’s the best way to create and edit an object over several form
screens before submitting it to the db?
I have an ‘edit_story’ form page, which has buttons for ‘add picture’
and ‘add_movie’. If the user selects either of these, they go to a
different screen to select and set properties for the movie or picture
they’re uploading. Then they go back to the edit_story page, which
should of course remember everything they’ve done so far. Once they’ve
done all their editing and movie/picture adding, they hit ‘submit’ on
the ‘edit_story’ page and the data is saved to the DB.
What’s the standard way of achieving this? Is it to pass a partially
constructed object around between the various screens, re-filling the
fields with its properties each time? Or to build the object up in the
db and then delete it if the user doesn’t submit? Or something more
elegant in the controller? or something else?
any advice welcome - thanks!