How to hide an element within my Dynamic Page?

I’d do the following:

  1. Set the video element to be hidden or even collapsed on load via the Property panel .

  2. When the page loads and the dataset ready check if the field has a value. In the case the value exists, show the element.
    Here is a sample code you can adapt by changing the IDs of your dataset, video field, and video element.

$w.onReady(function () {
	$w("#dataset1").onReady(()=>{
		if($w("#dataset1").getCurrentItem().videoField){
			$w("#myVideoElement").show();
		}
	});
});