<?php
  $lat = "";
  $long = "";
  if($item->value->value_string) {
    $gps_parts = explode(";", $item->value->value_string);
    $lat = $gps_parts[0];
    $long = $gps_parts[1];
  }
?>
<div class="row">
  <div class="col-md-5 padding-right-2">
    <label class="form-label" for="wfitem_<?=$item->name?>_lat_<?=$$wftype->id?>">GPS Breite <?=($item->required == 1) ? "*" : ""?></label>
    <input type="text" class="form-control" name="wfitem_<?=$item->name?>[lat]" id="wfitem_<?=$item->name?>_lat_<?=$$wftype->id?>" value="<?=$lat?>" placeholder="<?=str_replace(",", ".", TT_PLACEHOLDER_GPS_LAT)?>">
  </div>
  <div class="col-md-5 padding-left-2">
    <label class="form-label" for="wfitem_<?=$item->name?>_long_<?=$$wftype->id?>">GPS Länge <?=($item->required == 1) ? "*" : ""?></label>
    <input type="text" class="form-control" name="wfitem_<?=$item->name?>[long]" id="wfitem_<?=$item->name?>_long_<?=$$wftype->id?>" value="<?=$long?>" placeholder="<?=str_replace(",", ".", TT_PLACEHOLDER_GPS_LONG)?>">
  </div>
  <div class="col-md-2 padding-left-2">
    <label class="form-label">&nbsp;</label>
    <div><?php if($lat && $long): ?><a href="https://www.google.com/maps/search/?api=1&query=<?=$lat?>,<?=$long?>" target="_blank">Maps</a><?php endif; ?></div>
  </div>
</div>
