You will get some similar RESULTs like the following…
This should give you now enough of informations to solve your issue.
You will get some similar RESULTs like the following…
This should give you now enough of informations to solve your issue.
@adcmediaa
All you have to know → you will find in the DATASET -section of the VELO-API-DOC s.
@adcmediaa
You want to SAVE the collected DATA , right?
Than also search for → SAVE / INSERT / UPDATE or something similar.
https://www.wix.com/velo/reference/wix-dataset/dataset/setfieldvalue
@russian-dima i so sorry to bother you again and again cant get further i still not able to figure out how to save the information on other collection
also dont know what to use next setfieldvalue , save , insert, update or all of them
completly blank now what to do next
@adcmediaa
Concentrate on → setFieldValue/save . You will need some hours/days/month to understand it → depends on you and your effort to learn. My learning time was a way more difficult → tried almost everything to do by my own. Just in cases without any results after a lot of attempts, a lot of reading posts and articles, i ask for help.
Coding can’t be learned within some days, also not within some weeks → and also not within some month
The more you dive into CODE-DETAILS → the more confused you will be and the more you will understand → how far you are away from → understanding CODE.
BUT ! Once it will make → “CLACK” and you understand a part of what you are doing!
@russian-dima i guess you are right this is not going to work for me as i don’t even understand the coding language it would take year to get this work for me from 3 days i have not taken a proper nap due to reading so many documents and now feeling i will get crazy before i reach any where
I seriously wanted to thank you for your help and you being kind to listen my issue thankyou for sharing your valuable time anyways i am thinking to remove the booking option from website let the customer call and book it
Thank you @russian-dima
@adcmediaa
Why giving up so quickly?
Take a look at that…
Working CODE-EXAMPLE… (on BOOKINGS-page)…
//import wixLocation from 'wix-location';
let itemIndex, itemData
$w.onReady(function () {
$w('#dynamicDataset').onReady(()=>{
itemIndex = $w('#dynamicDataset').getCurrentItemIndex(); //console.log("Item-Index: ", itemIndex)
itemData = $w('#dynamicDataset').getCurrentItem(); //console.log("Item-Data: ", itemData)
$w('#btnSubmit').onClick(()=>{console.log("Button --> [SUBMIT] clicked");
console.log("Item-Index: ", itemIndex);
console.log("Item-Data: ", itemData);
let firstName = $w('#inpFirstname').value; console.log("First-Name: ", firstName);
let lastName = $w('#inpLastname').value; console.log("Last-Name: ", lastName);
let eMail = $w('#inpEmail').value; console.log("Email: ", eMail);
let phone = $w('#inpPhone').value; console.log("Email: ", phone);
$w("#dataset1").setFieldValues( {
"title": itemData.title,
"firstName": firstName,
"lastName": lastName,
"eMail": eMail,
"phone": phone
});
$w("#dataset1").save();
});
$w('#inpFirstname, #inpLastname, #inpEmail, #inpPhone').onChange(()=>{console.log("change")
let firstName = $w('#inpFirstname').value; console.log("First-Name: ", firstName);
let lastName = $w('#inpLastname').value; console.log("Last-Name: ", lastName);
let eMail = $w('#inpEmail').value; console.log("Email: ", eMail);
let phone = $w('#inpPhone').value; console.log("Email: ", phone);
let checkState = checkForm(firstName, lastName, eMail, phone); console.log(checkState);
if (checkState) {$w('#inpFirstname, #inpLastname, #inpEmail, #inpPhone').style.backgroundColor = "green"}
else {}
});
});
});
function checkForm(firstName, lastName, eMail, phone){
if(firstName && lastName && eMail && phone) {console.log("Validation --> valid");
return true
}
else{console.log("Validation --> invalid"); return false}
}
Example-DATABASE for Bookings…
Forgot to mention: → Always take a look behind the scenes → CONSOLE!
@russian-dima I cant stop saying myself to thank you for helping me even after i lost the hope you are really Great Coder and Great Preson who is very kind and have so much patient to explain things in detail
however i couldn’t have reached till here if you would have stop explaining the code and its basics and narrow down the issue also you have made en effort of making an example data structure just to explain me how does the code follow the process right from the base
Thank you for this lesson will make sure to use it in right way and share the knowledge to respect the knowledge
Thank so much @russian-dima
The example code you shared worked completely fine I have the page live now will design the page more better
Did you like the Website in how is the interface
please do share your review is how the website looks and works
@adcmediaa
The DESIGN you did, was not bad, keep going like that.
Of course you can improve a lot, but the most important improvements will be the UPGRADE of functionalities on your website.
A website without —> interactivity is not really a website, if you know what i mean.
That means → to generate/create a great website, you will have to learn how to code, no matter if you want or not