Gregory Bernardo Posted March 7, 2013 at 03:54 PM Share Posted March 7, 2013 at 03:54 PM I want to show/hide a div if a custom field is null. I have tried several different approaches and have come to determine that a passed custom field with null value is not actually null when processed by geoMaps. Test code from 'map_infowindow.thtml' <?php $liscense ='<span class="jr-map-jr_statelicensenum"></span>'; $liscensestate ='<span class="jr-map-jr_statelicensed"></span>'; if($liscense != ""): echo '<div>'; echo 'License: '.$liscensestate.'-'.$liscense; echo '</div>'; endif; ?> Result if custom fields have value: 'License: TX-123456' Result if custom fields are null: 'License: -' What value can I use in 'if($liscense != ""):' to determine null/not null? Thanks. Greg Link to comment
Alejandro Posted March 7, 2013 at 03:59 PM Share Posted March 7, 2013 at 03:59 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
Gregory Bernardo Posted March 8, 2013 at 08:47 PM Author Share Posted March 8, 2013 at 08:47 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
Recommended Posts