Trying to get this to work for a little while now and getting frustrated. The end result is that if field 23 is filled, a dash will appear before it with spaces before and after the dash. If the filed is not filled, then the dash is not printed and the display is empty. Field 10 is the main portion of the address which is selected from a drop down box. So far I have:
[php]
<?php echo $title; ?>
<?php $arr = get_post_meta( get_the_ID(), '_wpbdp[fields][10]', true );
foreach ( $arr as $item) :
echo “$item”;
endforeach; ?> <?php $field = wpbdp_get_form_field( 23 );
if (isset($field)) { echo ’ - '; echo $field->html_value( $listing_id );}
if (empty($field)) { echo $field->html_value( $listing_id );} ?>
foreach ( $arr as $item) :
echo “$item”;
endforeach; ?>