(RESOLVED) Collapse a stripe if a database text field is empty

Hello, I need your help, guys ! :slight_smile:

Simple : I want to collapse a stripe if a specific text field is empty in the database.

Thanks for your help and for your time !

PS : I search on the forum for 2 days, find a lot of people with the same king of request and try to adapt the answers in my case and nothing is working.

Have you seen this example from Giri which you can just change the field key from url to whatever your text field is supposed to be.
https://www.wix.com/corvid/forum/community-discussion/hide-an-image-when-a-text-value-is-null

Great, it works for me ! Thanks for the link, GOS :slight_smile:

For the ones interested, I adapt the Giriโ€™s code like this to fit with my personnal needs :

 $w.onReady(function () {
 $w('#datasetMB').onReady( () => {
 let Profil2Field = $w('#datasetMB').getCurrentItem().Profil2;
	if (Profil2Field) {
	        $w("#bande1profil").collapse();
                $w("#bande2profils").expand();
                $w("#bande3profils").collapse();
                $w("#bande4profils").collapse();
                }
        });
});