Insert + many images / best way to proceed (need advice)

Hi guys,
I spend time watching different tutos about uploading/inserting images and everything is clear (inser, upload, load, resize…).

I’m working on a form (in a Modal) with several inputs that finally insert a record in “tbl_tasks”.
This thing should come with one to many images (recorded in a second table “tbl_images”).

I’d like to offer the following experience for users:

  • entering the N first inputs (regarding my task: location, type…).
  • selecting and previewing 0 to N images one by one (photo description),
  • setting the N last inputs (expected date, emergency, whatever…).
  • and clicking the “Save” button

Have you experienced this workflow?
Have you got any advice?

Many thanks
Sylvain

Hi.
I don’t see any problems with the steps 1 & 2.
But I don’t understand what you want to do in 3rd step.

Are you stuck at some particular step or have you not started building the page yet, and just validating your idea first?

1 Like

Hi @sid,
Thanks for your answer. Just want to validate my idea and the best way to do.
My third step is setting other inputs after uploading N images.
Many thanks.
Sylvain

Ok. So the term “uploading” here could be “selecting” images.

You can show hide sections in the form for your setup.
First would show inputs… Second would be like a dropzone where images can be selected and previewed… Third would again be a set of input, with a sumbit button.

On submit, all three sections’ data - text and images - would get posted to your server action.

Sounds good.
I’ll try this (steps + dropzone)! Many thanks

This works perfectly!
Super thanks @sid for your answer!

1 Like