Actually such a simple question arose. There is a form with several fields that adds announcements to the database. The form has ajax loading of images , and I have a question how to transfer already loaded images when sending the form itself. The very first thing that comes to mind is to create a hidden field and place the name of the pictures there, with a successful ajax request.

  • you can use localStorage - L. Vadim

1 answer 1

I would do that. When a form is opened, an empty record is created in the database and we get its identifier. After submitting the form, use this id to attach pictures to the record.

  • But there is a moment, you start to add a new entry, uploaded the pictures and then closed the page and created an empty post with a picture. I forgot to clarify the image a lot can be. (max 7) - depredator
  • I would add the "show" field, which is false by default, true must be enabled manually in the admin panel - Roman M