My page is designed in a way that once user submits the form, a thank you message is displayed with a repeater showing the data entered by the user as confirmation.
Say, if my dataset has 30 columns, I show 3 repeaters with 10 column values on each.
There are chances that user might just fill the form with first 10 column values and after submit my other two repeater shows empty values.
I dont want to show the repeater if there are no values returning from dataset that has just been saved. Is there a way I can check the data value and mark repeater.show() or .hide() accordingly.
Here is my current code
function getData() {
let query = wixData.query(“Students”);
return query.limit(1).find().then(results => {
return results.items;
});
}
$w(“#Studentwrite”).onAfterSave(() => {
getData().then((items) => {
$w(“#repeater1”).data = items;
$w(“#repeater2”).data = items;
$w(“#repeater3”).data = items;
});
$w(“#repeater1”).show();
$w(“#repeater2”).show();
$w(“#repeater3”).show();
In the last 3 lines is where I need help in adding a code to determine if the column value is present or not.