Hi! I have a Dynamic Page with a repeater #listRepeater connected with dataset #DynamicDataset
When the repeater displays a list of the dataset 3 records into conteiner #conteiner1 i want to collapse the text elements if the record fields are empty!!!
I want to check dataset field MemberPhone conected with element #text6 at the conteiner
Wix-DATA-Version:
let EXAMPLE_REPEATER_DATA = [ { "_id": "1", "firstName": "Jane", "memberPhone": "0122345772634xxx" }, { "_id": "2", "firstName": "Josh", "memberPhone": "01533452326xxx" } ] $w.onReady(()=>{ $w('#myRepeaterIDhere').data = EXAMPLE_REPEATER_DATA; $w('#myRepeaterIDhere').onItemReady(($item, itemData, index)=>{ if(itemData.memberPhone) {$item('#text6').expand();} else {$item('#text6').collapse();} }); });
Dynamic-DATASET-VERSION:
$w.onReady(()=>{ $w("#myDynamicDatasetIDhere").onReady(()=>{console.log("Dataset-READY!") let item = $w("#dynamicDataset").getCurrentItem(); if(item.memberPhone){$w("#text6").expand();} else {$w("#text6").collapse();} }); });
It could be me, but I have this nagging feeling something is missing in your post, like a question.