HI
I created a collection that i want my clients to fill in a form and submit their check ins too. (Check-ins)
In this collection i have 6 fields that are uploads
4 images
1 video
1 audio
What code do i use to insert these so they show correctly in gallery’s ? i currently set them to value however they dont go in correctly they just go in as text in the collection i cannot see the images however when i go into the visitor uploads i can see they are actually uploaded??
in the collection set the fields to images videos and audio is that correct?
Heres the table and i cant see the images
Heres the collection cant see the images
And heres the visitor uploads i can see they are actually uploaded
Here is my code can you tell me what im doing wrong?
$w( “#submitCheckinButton” ).onClick( () => {
$w( '#checkInUploadBox' ).show();
let toInsert = {
“name” : $w( “#name” ).text,
“emailAddress” : $w( “#emailAddress” ).text,
“checkInDate” : $w( “#checkInDate” ).value,
“weightInKg” : $w( “#currenWeight” ).value,
“fat” : $w( “#fatInpercentage” ).value,
“howTheyFeltThisWeek” : $w( “#howTheyfelttextbox” ).value,
“frontPhoto” : $w( “#frontPhotoupload” ).value,
“rearPhoto” : $w( “#rearPhotoUpload” ).value,
“leftSidePhoto” : $w( “#leftSidePhotoUpload” ).value,
“rightSidePhoto” : $w( “#rightSidePhotoUpload” ).value,
“voiceNote” : $w( “#voiceNoteUpload” ).value,
“video” : $w( “#videoUpload” ).value,
};
wixData.insert( “check-ins” , toInsert)
$w( “#checkInSubmitted” ).show();
$w( “#checkInsDataSet” ).save();
$w( “#checkInsDataSet” ).onAfterSave(sendFormData);
} )
. catch ( (err) => {
let errorMsg = err;
$w( "#error" ).show();
} );