Want to require an image


#1

So I am creating a list and with each entry I have an image assigned to it. I am using your widget so users can upload their images. I want there to always be an image, so I either want the remove button to start a new upload or somehow require an image. I would prefer the remove button to start a new upload and if they cancel that keep the image that was already there. Any help or suggestions would be greatly appreciated.


#2

You can use dialog API of the widget. By clicking on the remove button it will call the dialog, and your image is replacing with a newly uploaded image. See this demo: https://codepen.io/optlsnd/pen/EQQzgM

Is this what you’re looking for?


#3

Yeah that is exactly what I was looking for, but now it is not doing the crop the way I have the app set up. How do I get that to work on my end?


#4

@tmadden you can add custom crop parameters into the settings object of the openDialog method.