Edit/update a form without updating a photo itself

Hi guys. I’m trying to figure out how to edit/update a form without updating a photo itself. Unless the user uploads a new one. What happen is when updating the post the cover photo is going away. :frowning: Any ideas on how to achieve this? Thank you again!

OK. OK. Here’s what I did. There must be a better way to do it this, but it did work fine. Congrats to React Studio! In this case, the problem was solved without needing any script.

There are two States in the component. If some user updates any field without changing the image, it will keep the current image because Firebase Uploader is located in the second State. If the user clicks [Update Cover Photo] it will change the content of the element to 2 witches allows data to be updated. Important.

  1. The /image in State 1/ data runtime is looking at datasheet and /image State 2/ runtime linkage to a data slot.
  2. Firebase plugin parameters must be set to “Store uploaded filepath to Data Slot”

Best, Marcos

I’m sorry. Actually what I did works only after image upload. If you exit the application or even clicking to create a new one and canceling, when you come back to edit again it will no longer work.

Hi, this is exactly how it needs to be done if one doesn’t want to add any hacky script to save data interaction. Basically it is two different save cases; one when image is updated and one when image is not updated.

Other way would be to save the current image path into Data slot when user enters the Edit screen but this solution would still require script…

Now it’s working! A little detail I forgot was the problem. You have to set the dataslot for the photo. Thanks Antti

1 Like