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…

Plus, there is this tutorial a;ready that you can use to suit your own needs…

1 Like

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 ();}});});})