Collapsing Empty Text Fields...

Hello ,

I am trying set up a repeater to have multiple sechedule lists. Some of the location time(s) very—so some of the text fields are left empty tell further notice.

Is it possible to remove the text boxs when the text field is empty on the Dataset?

Thanks in advance!

Currently my code is…


import wixData from 'wix-data';

$w.onReady(function () {
 //Wait for dataset1 to finish loading
    $w("#dataset1").onReady(function () {
 //get the value
 const textValue = $w('#dataset1').setFieldValue('');
 //collapse the text box textValue is empty
 if (textValue === '') {
            $w('#text12').collapse();
            $w('#text13').collapse();
            $w('#text14').collapse();
            $w('#text15').collapse();
            $w('#text16').collapse();
            $w('#text17').collapse();
            $w('#text18').collapse();
            $w('#text19').collapse();
            $w('#text20').collapse();
            $w('#text21').collapse();
            $w('#text22').collapse();
            $w('#text23').collapse();
        }
    });
});

Hi Colton,
I don’t understand your code.
I guess that what you wish for is onItemReady method. use the onItemReady function for code you want to run before new repeated items are rendered.
Check out the examples in the reference for inspiration.
Good luck!
Roi.