Is there a way to hide a field on the front end if it is blank on the back end?
Try this code, Might be it will be work for you.
<?php
$value = get_field(‘your_field_name’); // retrieve the field value
if ( ! empty($value) ) : // check if it’s not empty
?>
<p><?php echo esc_html($value); ?></p> // then output it (or your custom markup)
<?php
endif;
?>