Hide button if database PDF document is empty

i am working on a website and have a button that is connected to my database (dataset1).
the field that have the pdf files field name : TDS and button is button 1 to open the pdf. but on some items there is no pfd file. how can i make the button hide if the TDS field of that item is blank.

I hope someone can help me.

Simply use the search function in this forum as that has been asked before…
https://www.wix.com/corvid/forum/community-discussion/hide-button-on-dynamic-page-when-field-is-empty
https://www.wix.com/corvid/forum/community-discussion/how-to-hide-button-if-database-field-is-empty
https://www.wix.com/corvid/forum/community-discussion/hide-buttons-if-no-content

Plus, there is this tutorial a;ready that you can use to suit your own needs…
https://support.wix.com/en/article/corvid-tutorial-hiding-a-video-player-when-there-is-no-video-to-play

thank you i have use this code but they are not working for a pdf document in database

Any solution to this? I am having the same issue and reading through many forum threads there is no current answer to this.

I have use this and it works for me

$w . onReady ( function (){ $w ( ‘#yourDataset’ ). onReady (()=>{ $w ( “#yourRepeater” ). onItemReady (( $item , itemData )=>{ let sTitle = itemData . specialTitle ; if ( sTitle === “” || sTitle === null || sTitle === undefined ){ $item ( “#yourElement” ). hide ();} else { $item ( “#yourElement” ). show ();}});});})