Dataset = #teamDataset
#image11 = facebook icon
Each team member does not have every social media platform. How do I hide blank entries and collapse for a clean layout?
I searched previous questions, but still no solution. Thank you in advance.
$w.onReady(function () {
$w('#teamDataset').onReady( () => {
let url= $w('#teamDataset').getCurrentItem();
if (url) {
$w('#image11').show();
}
else {
$w('#image11').collapse();
}
});
});
All field still show the Facebook icon even though the field is blank.
Thank you in advance.
Can anyone help with this issue? After doing a search, there's others with the same issue still. Please and Thank you.
You should specify the field key of the URL, something like:
let url = $w('#teamDataset').getCurrentItem().url;