Can someone please advise me what is the best practice for handling Image fields in a collection when that field is not a mandatory field i.e. I need to cater for the case when there is no image associated with that record. I’ve tried obviously setting it equal to image.src when that contains an empty string, but then you get the message “Cell value is text. Change to Image”. I dont want to use a default image. Do I have to redefine the field type as string and just store the URL?
1 Like
If the field is used for storing images then it is recommended that you set the field type to image. You can use the text field type to store URL as long as you know that you will have to deal with conversion of text to URL should you choose to display the image on your site.
Thanks Sam. I understand your point about using the Image field type, but this response doesn’t really address my basic question which is what to do when the record doesn’t contain an image. I’m getting the record written to the collection, but Wix is displaying field type errors when I view the collection.
did you ever find a solution?